LabVIEW

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 8
(5,332 Views)

Hi Kamasani,

 

load your image in a picture indicator, find the defect pixels, replace them by red pixels.

 

Or:

Load the image, put it in the background of a XY graph. Use a XY plot to mark defect pixels.

 

Or:

Put the image in a intensity graph. Change the defect pixels to red…

 

Or:

Use IMAQ to do your job. (Can't suggest solutions here as I don't have that toolkit installed…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(5,308 Views)

Hi GerdW,

 

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. Can you please suggest where i am going wrong

Regards,
KM
0 Kudos
Message 3 of 8
(5,295 Views)

Hi,

 

as I wrote before: I don't have IMAQ installed - so I cannot comment on your code…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(5,280 Views)
Solution
Accepted by topic author KevinKM

You are passing an empry array into an autoindexing for loop.  This will not execute.

 

The overlay looks ok if this code actually could itterate.

 

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 5 of 8
(5,256 Views)

Hi falkpl,

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 6 of 8
(5,225 Views)

Not sure I understand your descriprion.  Do you have a photo of the processing you are trying to do?

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 7 of 8
(5,171 Views)

Hi Paul,

Thanks for your reply, I had to overlay a dot on the image for few pixels. I figured out the issue and its resolved now. Passing empty array was the problem and its all fine now.

I had posted a similar query in Machine vision forum as well, i just forgot to mark it as solution here. 

Regards,
KM
0 Kudos
Message 8 of 8
(5,157 Views)