取消
显示结果 
搜索替代 
您的意思是: 

Seemingly Random Bug in Code while post processing images

Hello, 

I am having an unsual issue that I have been unable to solve. I have created a VI that performs several functions to either a folder of images or an AVI. Specifically, I am having an issue with my overlay ECU information method which applies a BCG LUT and overlays information from a text file on the images. I give the user the option of saving the images as either 8-bit images or 16-bit images. Sometimes, the images save as I want, but sometimes all the output images are all black. Without changing anything within the VI this bug occurs. I am at a loss for what is causing this. My one inclination is that sometimes after the BCG LUT table is applied and when the image is turned into an 8-bit image the pixels are not within range and they are turned into all black within the array. This prediction doesn't explain why it also occurs when outputting 16-bit images. In addition, I have tried the same BCG values running the VI different times and sometimes I get black images and sometimes I get the expected images. I have attached my VI(UI_EditedBlockDia.vi) and an example input folder of images and ECU info.

0 项奖励
1 条消息(共 6 条)
4,152 次查看

Hello,

 

I think the problem may be that the Image Indicator on your front panel will only output either a 16 Bit or 8 bit image. You may need to change the settings for the indicator depending on the bitness of the image that you choose.

Matt G.
Product Manager
National Instruments
0 项奖励
2 条消息(共 6 条)
4,050 次查看

I don't see where I need to specify 8-bit or 16-bit, and I am not sure how this is going to change how many images are saved to a folder outside of labview.

0 项奖励
3 条消息(共 6 条)
4,039 次查看

I'm sorry, I think I misunderstood the problem: Some of your images are saved as all black but it doesn't matter if they are 8 bit or 16 bit? Correct? And then based on your recent reply: is every image still saved, or some of them are not if the number of images vary? 

Matt G.
Product Manager
National Instruments
0 项奖励
4 条消息(共 6 条)
4,026 次查看

Correct, the bug happens with both 8-bit and 16-bit images, and yes all of the images save. The bug usually happens when i first open the VI, but after I run the VI with different inputs and then use the same inputs that created the bug to run the VI again, the issue usually resolves but not all the time. I have been unable to recreated the error reliably. For example, the error doesn't always happen when I first open the VI.

Thanks

0 项奖励
5 条消息(共 6 条)
4,024 次查看

I tried running your code to be able to replicate the issue but I'm missing the controls (Control 3.ctl). Can you include either a project with all of the files or a smaller reproducing case so we can try to replicate the behavior that you're seeing?

 

Matt G.
Product Manager
National Instruments
0 项奖励
6 条消息(共 6 条)
3,990 次查看