Hi can anyone help me read in and display two images using C language. I have a school project which needs to compare two images and difference / subtract and display difference in new image. It requires the following steps basically:
I think I would like to develop this bit by bit. So, I guess I need to look at all the processes I need to complete and tackle them one by one in separate functions. So first,
1. I need to load the images into C and probably turn them into binary / black & white. This will reduce the file size which is good.
2. I need to align the images
3. I need to difference the images and show the new image
4. I need to locate the center of the difference object and create a bounding box around them
5. The objects once located need to be detailed
So, for 1, will I need to import all the image pixel values into an array / matrix?
P.S. I'm really not a good programmer and this is going to be a big learning curve to take slowly over the next 3 weeks.
JPG's are lossy. Meaning, even if you have the exact same raw image and saved it as a JPG in different JPG compressors, they might not be equal at the pixel value anymore. In fact this is pretty much a guarantee.
Worse, even if you load the exact same image twice, and loaded it using different JPG decoders, the pixel values will probably not be the same.
This may very well be the kind of changes you are after, but they might very well totally ruin any idea you had about this project. non-lossy formats like png/gif may be more appropriate for some things.
Really? From what I recall and as I interpret the Wikipedia article it's not. Admittedly I didn't bother to consult the official spec at this time-of-night though.
The assignment seems to essentialy boil down to simple math and 2D array handling, except for item #2: aligning the subject images. Unless I misunderstood that point or the alignment parameters (offset between image origins) are pre-specified, this requires image segmenttion/feature extaction, which IMO is at least advanced college level. Doesn't really fit into the overall picture...
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.