05-25-2018 05:21 AM
Hi,
Greetings 🙂
I have to read a folder that consists of BMP image file which is monochromatic , do a preprossing depending upon a condition .
If the condition is fulfilled , only that image is saved in a new folder.
I have uploaded my vi and a sample image in the post.
I am facing error in reading the bmp file from the location.
Kindly let me know where am I wrong? and suitable solution to fix this bug 😞
I am using vision Acquision and Labview version 15I was unable to upload bmp file hence took a screenshot .
Attached is the properties detail of the bmp file
Thanks and Best,
Lipika
05-25-2018 07:40 AM
What error Message do you get?
I get none, once I correct the image file path. In my test, I had to include the extension.
06-04-2018 03:23 AM
Hi,
I do not get any error explicitly.
However, I do not get the output as expected! 😞
The aim is to read a folder of bmp files one after the other and depending on the condition either save it or do not save .
When I read the file ,while highlighting the wire diagram I see the unexpected error of reading the bmp file .
I have attached the error in the post.
I included the extension too but no much help it seems 😞
Thanks a lot in advance!
06-04-2018 07:19 AM
06-04-2018 09:41 AM
I confirm it's an erroneous path, i get the same behaviour.
/Y
06-08-2018 05:23 AM
Hi,
Thanks for your reply.
In that case changing the whole path file didn't help much.
How do you suggest that would help me take the whole folder of the images to process the loop?
Thanks
Lipika
06-08-2018 10:02 AM
Snippet for idea.
/Y
06-08-2018 10:13 AM
Hi Lipika,
Are you trying to write your acquired image from camera into a bmp file through some other program? and in parallel you want to check for the intensity of the image? If this is the case, You need to have a synchronization mechanism between your writing and reading part! because sometimes when you try to read the bmp, the complete content will not be written to the file. That's why you get the file error!
If this is not your case, then try Yamaeda's solution
I hope this helps!
-- Achuthan
06-09-2018 03:13 PM
I looked at your code (horrors! have you ever heard about sub-VIs? And trying to keep your wires straight (and horizontal)? Actually, I've seen much worse, it's just a bit confusing to figure out what is going on).
I think I understand what you are trying to do, which is very close to what you described in your Post -- you've got a whole lot of Image files (.bmp), and want to define a sub-set of those files for further processing. You are using a Producer/Consumer design, where the Producer reads (what looks like the file C:\test27.1 every time, but that's probably not what you mean), gets a binary image out, does some tests on it, and puts the Image on a Queue to send to the Consumer Loop (where more work gets done).
Question -- why pass the Image? Why not open a text file and whenever you determine that a particular File meets your criteria, save the File Name in the text file? Very simple, very fast, no need for memory considerations, certainly it would be difficult to find anything faster. Of course, now you have to write a second program that reads your Text file and does whatever processing you need to do on the Images in those Files that you already know meet your criteria. Of course, you can combine the "Filter BMP Files" and "Process Selected BMP Files" in a Producer/Consumer Design, but don't bother passing Images (very large, will start consuming memory), pass instead the File Path (very small, only need one IMAQ Buffer, minimal memory requirement, much faster, much simpler to understand and debug).
Bob "Simple-Minded" Schor
06-18-2018 05:00 AM
Hi Achuthan,
You are right!
1.I have saved the images captured through camera in a folder.
2. I am trying to access the same folder to compare intensities and then do a set of condition test.
If the test is passed , new images are saved or else ignored.