LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why the image is not displayed

Please see attached image first.

 

In this VI, I have an 'image in', then process the image in a FOR loop and out to an image display. But the weird thing is I got nothing in the image display. I set the 'Snapshot' mode, and I even tried to probe each image wire, even the probes don't return any visible image. This puzzled me so bad. Does any one knwo the reason? By the way, the image is definitely there, because the next VI following this one physically saves all the images into my harddrive. 

 

Thanks much. 

0 Kudos
Message 1 of 8
(2,894 Views)
Where do you get the ImageIn from? I hope you are using 'create new image vi' first as it will allocate memory in the OS for that image to be displayed. Also, just for debugging purpose you may want to move your ImageDisplay inside FOR loop and put brake point somewhere inside the loop, the execute one loop iteration at the time and see if the image is there.
0 Kudos
Message 2 of 8
(2,881 Views)
yes, I did create a buffer for the image first, then set the image size. I tried put the image display inside the loop too, still it doesn't show nothing. That's why I said it puzzled me really bad. 
0 Kudos
Message 3 of 8
(2,841 Views)
how about before FOR loop? Can you see the image before it enters FOR loop?
0 Kudos
Message 4 of 8
(2,837 Views)
NO, I probed every image wire. Nothing was showing up. Do I need to make the 'Image In' an Image Display to make other image visible?
0 Kudos
Message 5 of 8
(2,824 Views)

My next question is where the image data coming from? Is it 1. generated in one of vis inside FOR loop or does it 2. come from just before FOR loop and being manipulated inside the loop? 

 

In case 1 I would examine the vi that produces the image data, probe for any errors and verify that you can see the image

 

in case 2 pretty much same as 1, except it has nothing to do with FOR loop, you have to go back to where the image data is being generated and verify that it is there prior to getting into FOR loop. 

0 Kudos
Message 6 of 8
(2,819 Views)

I appreciate your time to help. Thanks much.   

 

The image is set before the loop. Inside the FOR loop, for each iteration, a small image was stitched into this image. I probed each individual small images and I can see them. 

 

And I did probe where the image size was set; and yes, I can see it, a large black image. After that, it's invisible. There is no error all through, and like I said, I can physically save the data into the hard drive.

 

 

0 Kudos
Message 7 of 8
(2,812 Views)

I would examine the Image Cut and Stitch vi. It appears that it receives the valid black image on first iteration and then instead of gradually replacing black image rows (stitching) with some valid image data it mangles the whole thing. 

 

Also you can try to run FOR loop only once by giving it array with a  single element so that whatever data is generated will be sent directly to the output image without stitching.  If you will see the narrow image, then you will confirm that stitching somehow is causing your problem

0 Kudos
Message 8 of 8
(2,802 Views)