10-01-2011 05:49 AM
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.
10-02-2011 09:26 AM
@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
10-02-2011 07:38 PM
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.
10-03-2011 07:27 PM
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.
10-04-2011 06:09 AM
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.
10-05-2011 05:44 PM
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.
10-05-2011 10:57 PM - edited 10-05-2011 10:58 PM
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.
10-05-2011 11:01 PM
also these two
10-06-2011 12:45 PM
That seems like a pretty sizeable undertaking. Which step are you stuck on here, and what kinds of things have you tried?
10-06-2011 07:52 PM
I have tried the first three parts, the others are still working on.