From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Create an all-zero grayscale image

Solved!
Go to solution
How to create an all-zero grayscale image? I think this question is stupid but please show me the correct and efficient way. Thanks!
0 Kudos
Message 1 of 3
(2,683 Views)
Solution
Accepted by topic author tomsze

Use IMAQ Create to create the image.

 

Use IMAQ SetImageSize to make the image the dimensions you want.

 

Use IMAQ FillImage to set the color of the entire image.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 2 of 3
(2,666 Views)
The other way is to create 2D array by initializing with 0 values and the row and index as image size and convert to image.
Thanks
uday
Message 3 of 3
(2,651 Views)