Issue in using imread and imwrite in thread
Hello All, I have written a program in cpp which takes image form camera and save it in a folder. There is another program which reads the save image form the folder and do some processing on the image. My problem is sometime i get only half image saved and the other is blank. After the above mentioned issue i am not able to fetch any image from the camera and also my thread breaks. I also got an warning message:Premature end of JPEG file
so, process1 writes to disk(multithreaded), and process2 tries to read from disk, and, not being synchronized at all, eventually reads garbage ?
sounds more like "noobs at work", not an opencv problem.
@berak: Here i am not referring to same image being written and read For example i have image 1 already saved in the disk. I try to write an image 2 in the disk and simultaneosly read the image 1 using thread. will it create any issue??