I need to implement the holes filling algorithm for binary images in Visual Basic 6.0
The filling algorithm steps as follows:
1. Find and label the regions corresponding to background
intensity. Labeling Algorithm is included below.
2. Separate the regions belonging to either background or
holes based on the following condition.
In each region, the ends of runs are checked for image
limit. If a run ends with image limit then the entire
region will be marked as a background. Otherwise it is
marked as a hole.
3. Repeat step 2 for all the detected regions that are having
intensity equal to background.
4. Change the intensity of regions that are marked as holes
to foreground intensity (hole filling).
Labeling Algorithm :
Region labeling using run length encoded data is simple and
fast. This algorithm has two passes. In first pass, the runs are
analyzed for neighborhood and labeled in row-wise. The
label collision problem realized in first pass is solved by
second pass. The algorithm has the following steps.
1. First pass: Use a new label for each continuous run in
the first image row that is not part of the background.
2. For the second and subsequent rows, compare the
positions of runs.
(a) If a run in a row does not neighbor (in the 4- or 8-
sense) any run in the previous row, assign a new
label.
(b) If a run neighbor precisely one run in the previous
row, assign its label to the new run.
(c) If the new run neighbors more than one run in the
previous row, a label collision has occurred.
(Collision information is stored in an equivalence
table, and the new run is labeled using the label of
any one of its neighbors).
3. Second pass: Search the image row by row and re-label
the image according to the equivalence table information.
The input and output is as in the attached image, no library or com is allowed
I also attached the pdf paper of the algorithm
Hi, I read your description. I will write VB program to implement the algorithm. Its a very easy task. I will post a video in sometime demonstrating you that my app works. I will use Floodfill algorithm to first find the largest white area. Sometimes the file when you save it, the boundaries are not exactly perfect black or perfect white. They are grey. The flood fill will still take care of it these boundaries by marking brighter greys as white and darker grays as black. The algorithm will mark everything inside the big white area as white, which will also remove black spots. Will take only half hour to code it. You pay me only when you are satisfied. :)
(Update)
As I promised, here is the app, I already made it. Please see the way it works:
[login to view URL]
$150 USD en 1 día
5,0 (4 comentarios)
2,8
2,8
7 freelancers están ofertando un promedio de $235 USD por este trabajo
Hi Sir,
I am ready to work for you.I have 9 years of experience in C/C++ , java, visual basic and, MySQL. please see some of my works also check my reviews you will get better idea about my skill.I deliver quality work within time frame. Please visit my profile once.
Thanks with regards,
Amit
Hi,my friend
As one of the best VB expert of the world,I've been rewarded as MS-VB-MVP for many times.I'm working in a large hospital,I think I can help you.
Regards
Zhining
My name is Ivo and I've created in the past an OCR (Optical character recognition) in VB6, that uses a custom "Floodfill" algorithm that may be useful for your project. The program reads bitmaps in binary.
Please contact me to discuss more details.
Regards,
Ivo Carvalho
Hello, client.
I have seen your job post and interested. My major study just is image processing and I am very familiar with binary image.
I am sure I can help you.
Jixing.
Dear,
I am a researcher in the field of image processing. I know about region labeling and flood filling method. Please let me know, in which platform you want the code.
Thanks.