-
December 18th, 2012, 07:04 PM
#1
Image Processing
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?
Thank you
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.
-
December 18th, 2012, 07:05 PM
#2
Re: Image Processing
OH - I should have said that they are .jpeg files
-
December 19th, 2012, 03:37 PM
#3
-
March 12th, 2013, 12:51 PM
#4
Re: Image Processing
If you're using objective C at all this could help you with image processing. http://www.verious.com/board/AKumar/...-best-methods/
-
March 13th, 2013, 08:42 AM
#5
Re: Image Processing
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.
-
March 15th, 2013, 06:45 PM
#6
Re: Image Processing
GIFs are lossy too.
An uncompressed bitmap file would be the easiest to process.
-
March 15th, 2013, 09:22 PM
#7
Re: Image Processing
Originally Posted by Coder Dave
GIFs are lossy too.
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|