Results 1 to 5 of 5

Thread: Image Recognition

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2002
    Posts
    1

    Image Recognition

    I am writing an application that takes snapshot images!

    I would like to be able to call a function that will take any two images and give me an indicator that they have changed.

    Basically a diff type function that would return a number indicating the threshold of the change.

    ie. lDiff = jpregcompare(IMAGE1,IMAGE2) returns long;

    lDiff would get some kind of number that I could use to determine weather or not the image changed enough for me to take action.

    ie. video surveillance, turn on VCR, turn on Lights, ...etc

    Anyone got any code or controls that will let you mess around like this????

  2. #2
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    A simple way would be to just loop through each pixel, and log when any are different. Then if this is a large enough number then count it as a change.

    The more complicated way would be to, having logged a change, calculate how different it is, then decide based on that as well.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  3. #3
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    alright I am sure this is not the best way, but some way to go

    you can invert the first picture and than draw the other one with paintpicture (BitBlt would do it too) with the operator vbSrcInvert onto the first one. Now you could look for any pixels not black and count them this will give you the total number of changed pixels.
    Sanity is a full time job

    Puh das war harter Stoff!

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    However, since you are using JPEG and a video source, it will have a lot of different pictures because of compression and graininess. You better be careful with that method, rather than judging how many pixels changed, judge how much the pixels changed by.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    true true I did not read through the post properly...

    maybe the convolution thing would help you... (just a guess, not an answer to your problem) you could find some sample on that on www.ur.co.nz
    Sanity is a full time job

    Puh das war harter Stoff!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width