Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how to feed the vision assistant a grayscale u8 image?

I'm actually working with kinect camera

I have difficulty with transforming depth array U16 into an image cluster(purple)

when the depth array goes into vision assistant it always get error back(1074396120)(really frustrated T.T)

0 Kudos
Message 11 of 18
(2,282 Views)

So you are acquiring the 11-bit depth image from Kinect and trying to do some image processing on it? What kind of processing are you performing on the depth image?

Try casting the image to 8-bit first and see if that works without errors. You could of course poste more code which would be easier to debug, rather than guessing. But the error -1074396120 refers to "not an image" error.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 12 of 18
(2,275 Views)

do you have kinect and kinesthesia?

if you have I can post all the vi

0 Kudos
Message 13 of 18
(2,265 Views)

Hello,

 

i have attached a simple example of Vision Assistant image processing on 8-bit images. It thresholds the 8-bit input image and uses dilation to expand the thresholded objects. The processed image is then displayed.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 14 of 18
(2,264 Views)

how did you make the purple one u8 input?

0 Kudos
Message 15 of 18
(2,259 Views)

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 16 of 18
(2,254 Views)

let's change an other way 

 

this time it shows no error but the result isn't what I see in assistant(should be red&black , not all black)

 

 

0 Kudos
Message 17 of 18
(2,248 Views)

Hello,

 

you really should explore some examples first. If you are thresholding an image in two bins, the values returned will be equal to 0 (for values under the threshold value) and usually 1 (for values over the threshold value). If oyu are using an 8-bit image with 256 bins, you will certainly not notice the difference between the values 0 and 1. So in order to see the thresholded area for an 8-bit image in your case, you should use:

 

test_BD.png

 

Alternative is to change the display pallete to binary.

 

The red representation in NI Vision Assistant is just an interpretation of the thresholded area.

 

Best regards,

K

 


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 18 of 18
(2,239 Views)