Image Processing
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: Image Processing

  1. #1
    Join Date
    Dec 2012
    Posts
    6

    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.

  2. #2
    Join Date
    Dec 2012
    Posts
    6

    Re: Image Processing

    OH - I should have said that they are .jpeg files

  3. #3
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,636

    Re: Image Processing

    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    http://www.microsoft.com/visualstudio/eng/downloads

  4. #4
    Join Date
    Mar 2013
    Posts
    5

    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/

  5. #5
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,061

    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.

  6. #6
    Join Date
    Feb 2013
    Location
    United States
    Posts
    56

    Re: Image Processing

    GIFs are lossy too.

    An uncompressed bitmap file would be the easiest to process.

  7. #7
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,594

    Re: Image Processing

    Quote Originally Posted by Coder Dave View Post
    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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center