Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to ask that whether I can generate a vertical projection histogram and a horizontal histogram using labview?

I am now doing an assignment that is about image processing. However, I have a lot of questions in using LabView, so I would like to ask for help.

 

As the subject metioned, i would like to generate a vertical projection histogram and a horizontal histogram, the histogram block in LabView and only count for the total number of pixels that exist in the image but not the one I want to have.

 

Furthermore, I wonder it is possible to have a method for hole detection. I have tried many different method in Vision Assistant but can't get the result. Apart from those, I also need to do the pattern thnning, Line tracing, Image filtering and the line pattern filtering.

 

Thanks so much for reading and answering the questions.

0 Kudos
Message 1 of 11
(3,558 Views)

@kt lee wrote:

As the subject metioned, i would like to generate a vertical projection histogram and a horizontal histogram, the histogram block in LabView and only count for the total number of pixels that exist in the image but not the one I want to have.


When creating a Histogram, you can apply a mask image, see e.g. here
Using a mask image allows you to "histogram" an arbitrary part of the image.

Hope this helps, Guenter

0 Kudos
Message 2 of 11
(3,554 Views)

Oh, I got it, Thanks so much. However, for the other parts that I have metioned, I still can't do.

I have one more question to ask, can I use anything that related to OCR read text or the bounding box to print my name at the top of the image?

 

Thanks.

0 Kudos
Message 3 of 11
(3,551 Views)

For hole detection, you will probably have good results using the "Circle Detection" step in the Vision assistant.  There are also a number of filters available to use in LabVIEW to do the other filtering you requrie.  As far as overlaying your name, check out the "IMAQ Overly Text" function.  This may be the kind of thing you're looking for.

0 Kudos
Message 4 of 11
(3,540 Views)

Thanks for your repIy.I can do part of them, but all the processing are based on an image as shown, so i couldn't find a suitable method to do the image processing.

0 Kudos
Message 5 of 11
(3,534 Views)

Can you provide a more specific example of the things you're trying to do with this image?  I'd like to help you break this is issue down, but I'm not exactly sure what kind of processing you need to do.

0 Kudos
Message 6 of 11
(3,517 Views)

Oh..really thanks so much for helping me.

 

Here's the questions and things that I have to do.

 

1. Text line and character extraction. Compute the horizontal histogram and extractthe two text lines, then compute the vertical projection histogram of each line and findthe bounding box of each character. Use these characters and down-sample them by afactor of 2 in both horizontal and vertical directions to display your name and studentID in every output image of this project. You should show three histograms and theoutput image. Your output image should look like Figure 3, in which only the resultfor character “9” is provided as a reference.

 

2. Hole detection. Implement the method for hole detection based on connectedcomponent labeling discussed in tutorial. Set the intensity of pixels in the holes insidecharacters to 200, intensity of character inner-boundary pixels touching the non-holebackground to 0, intensity of character inner-boundary pixels touching a hole to 250,and intensity of other pixels in characters to 100. Your output image should look likeFigure 4.

 

3. Pattern thinning. Thin all character patterns you have extracted in Step 1. Youshould use 8-adajacency and make sure the lines are one-pixel thick. Show anintermediate result and the final result for pattern thinning. State the total number ofpixels that are removed to produce the final result. The intermediate result should haveabout half of the total number of pixels that are removed. Show these removed pixelswith intensity 201. Your output images should look like Figure 5.

 

4. Lin tracing. Trace the lines you have obtained in Step 3. Set the intensity of two endpoints of each line and their 8-neighbors to 0 and let the intensities of the pixels alongeach line change linearly in the range of 50 to 200 from the first pixel to the last one.Your output image should look like Figure 6.

 

5. Image filtering. Filter out noisy points on the background and fill small holescorresponding to connected components with size less than 10 pixels. Your outputimages should look like Figures 7 and 8.

 

6. Line pattern filtering. Thin the filtered image produced in Step 5. Your output imageshould look like Figure 9. Remove lines with length less than 5. Your output imageshould look like Figure 10.

 

Download All
0 Kudos
Message 7 of 11
(3,514 Views)

also these two

Download All
0 Kudos
Message 8 of 11
(3,511 Views)

That seems like a pretty sizeable undertaking.  Which step are you stuck on here, and what kinds of things have you tried?

0 Kudos
Message 9 of 11
(3,500 Views)

I have tried the first three parts, the others are still working on.

0 Kudos
Message 10 of 11
(3,485 Views)