Ask Your Question

Yves's profile - activity

2018-05-14 02:00:24 -0600 edited question Why does the compilation of opencv download lots of things?

Why does the compilation of opencv download lots of things? I just downloaded the opencv 3.3.1 from the official website

2018-05-14 01:40:45 -0600 received badge  Editor (source)
2018-05-14 01:40:45 -0600 edited question Why does the compilation of opencv download lots of things?

Why does the compilation of opencv download lots of things? I just downloaded the opencv 3.3.1 from the official website

2018-05-14 01:39:26 -0600 commented question Why does the compilation of opencv download lots of things?

@break Because my project depends on this version.

2018-05-14 01:18:01 -0600 received badge  Student (source)
2018-05-14 01:16:22 -0600 asked a question Why does the compilation of opencv download lots of things?

Why does the compilation of opencv download lots of things? I just downloaded the opencv 3.3.1 from the official website

2017-08-10 01:37:47 -0600 received badge  Scholar (source)
2017-08-10 01:30:14 -0600 commented answer Is it possible to edit an image in hex format and then to open it as normal

Yes, watermarks, exactly :D in fact we have used watermark. But My Boss thought it was not enough...

2017-08-10 01:17:03 -0600 commented answer Is it possible to edit an image in hex format and then to open it as normal

I'm totally a newbie on things about image. My Boss wants to find a way to make an invisible mark on our images because our images are too important and expensive. My thought is to change something in headers... Well, if it doesn't work for jpg, obviously I got a wrong idea...

2017-08-10 00:59:32 -0600 asked a question Is it possible to edit an image in hex format and then to open it as normal

I know that an image file contains not only pixels but also some other information about the file.

For example, a jpeg file always starts with FFDB FFE0.

I'm thinking if I can change a few of information in a jpeg file but it can be still opened as normal.

For example, imagine that there is a jpeg image file as below:

0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 
0x00, 0x01, 0x00, 0x00, 0xFF, 0xDB, 0x00, 0x84, 0x00, 0x09, 0x06, 0x07, 0x13, 0x13, 0x12, 0x13, 
0x13, 0x13, 0x13, 0x16, 0x15, 0x15, 0x17, 0x18, 0x18, 0x18, 0x18, 0x18, 0x17, 0x17, 0x18, 0x17, 
0x1A, 0x16, 0x1F, 0x18, 0x1D, 0x17, 0x18, 0x17, 0x1A, 0x18, 0x18, 0x18, 0x1D, 0x28, 0x20, 0x1D, 
0x1A, 0x25, 0x1D, 0x17, 0x1A, 0x21, 0x31, 0x21, 0x25, 0x29, 0x2D, 0x2E, 0x2E, 0x2E, 0x17, 0x1F

If the first 0xFF is a thing that I can change, meaning that no matter what it is, this image file can be printed as normal, I may want to change it with another value.

So my question is: Is there something I can change in a jpeg file?

Also, here is my program about converting a jpeg to hex file:

int main(int argc, char **argv)
{
    Mat image;
    image = imread("test.jpg", 0);  
    for ( int i=0; i<image.total(); i++ )
    {
        cout << cv::format("0x%x ", image.at<uchar>(i)); // this prints hex numbers ( 0x40 for 64, etc)
    }

    return 0;
}

However, when I execute it, I get a file starting with 0x2f 0x30 0x30 0x32, how comes? I think all of jpg files should be started with 0xFF, 0xD8, 0xFF, 0xE0.