Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Draw line or a dot for a specific pixels on the image

Solved!
Go to solution

Hi all,

I have an 8bit grayscale image, i have extracted the column indeces of Image which has defects. I need to mark the defective pixels with a line or dot indication on the image. Can anybody suggest me how to go about it.

Regards,
KM
0 Kudos
Message 1 of 7
(4,832 Views)

Hello,

 

check out the IMAQ Overlay pallete.

 

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 2 of 7
(4,821 Views)

Hi Klemen,

Thanks for your time,

I tried using overlay oval vi with No luck, i have attached the snippet. I am not getting any image output from the overlay oval vi. 

 

Regards,
KM
0 Kudos
Message 3 of 7
(4,808 Views)
Solution
Accepted by topic author KevinKM

Hello,

 

first of all, I do not know how you interpret "column indices", but in the overlay input you are passing this as a "y" coordinate - so this should be "rows indices"? Are you using rotated image?

 

Secondly, why do you pass an empty array to the for loop for "x" coordinates? In order for the overlay oval to work, you need to input valid "x,y" coordinates of the oval location.

 

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."
Message 4 of 7
(4,799 Views)

Hi Klemen,

Thanks for your  time, the overlay is working fine, i passed a 1D array of constant pixels (i.e 250)(Y Coordinates)

Here is my actual requirement:

I am having a Grayscale 8-bit image (3969 X 600)(To find the pixel values widthwise which has defects, X-Coordinates).

  • I perform sum of column pixels to get a 1d array.
  • I get the average (average= sum/size of 1d array)
  • I find the pixel values above average.
  • Finally i extraxt the Non-zero indeces for the pixel values. 

I am facing an issue to find the Cooresponding Y-Coordinates(Pixels for height) for the X-coordinates(Pixels for Width). So i can feed the both x & y coordinates to overlay function to mark the exact pixel with defect on the image.

 

I would be glad if you suggest me how to find the height pixels for the corresponding width pixels.

 
Regards,
KM
0 Kudos
Message 5 of 7
(4,781 Views)

Hello,

 

since you've marked a solution, I assume that you've managed to properly overlay the oval?

 

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 6 of 7
(4,741 Views)

Hi,

I was able to find the row indeces using the column indeces. I managed to overlay oval on the image.  Thanks for all the hints you provided to make it happen.

Regards,
KM
0 Kudos
Message 7 of 7
(4,733 Views)