IMREAD Not working with windows form

asked 2014-03-30 20:49:08 -0600

updated 2014-03-31 01:47:40 -0600

berak gravatar image

I wanna do what I believe should be simple, but it's giving me a headache. I have a windows form that takes a picture from an external camera. The process works like this:

  • Click button on form
  • Send command camera to take JPEG image.
  • Load JPEG using IMREAD
  • Do some face detection
  • Save to new JPEG with face detection rectangle around face
  • Display pic on windows form

This works perfectly if I only do it ONCE. So let's say I try to take another pic, It won't work. Though the JPEG from the camera has been replaced by a new picture, it will not read it and therefore it will not update the new file. Any idea why this may be happening? any suggestions?

edit retag flag offensive close merge delete

Comments

1

We could help you better if you post some example code.

Martin Peris gravatar imageMartin Peris ( 2014-03-30 23:02:40 -0600 )edit

It has probably something to do with you handling a wrong pointer to the image data. However, like Martin said, without code, we will not be able to give you a solution!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-03-31 09:22:42 -0600 )edit