Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21611 Discussions

need help in image processing

Altera_Forum
Honored Contributor II
1,485 Views

Hi FPGA experts i need a help in processing an image.....plz find the attachment of the image it is having some white and black lines...here i have to exactly count only the white lines....how i can do this in FPGA.....already i processed the image using sobel edge detection but i didnt get exact edge detected image...so that i cant able to proceed furthur....so some one plz guide me in which way i can implenment this in FPGA.....

0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
735 Views

Hi, 

 

This will not be easy to do since it will require a fair amount of processing to reliably extract the light and dark bands. Unless you really need to do it fast (=realtime), software processing will definitely be easier. If you have a reliable algorithm in software, you could maybe look at ways to implement it partially, or completely, in an FPGA. But first sort out the algorithm in software. 

 

Regards, 

Niki
0 Kudos
Altera_Forum
Honored Contributor II
735 Views

i would start by playing with the contrast. most of the dark bands look like they have very low intensity, so i would try thresholding the input values to 0 if they are below a low value (maybe 40) and otherwise set them to 255. you will have a black and white image and hopefully the bands will be very well defined 

 

then you could try going down a number of pixel columns and counting the number of transitions between black and white. if you did this every 10 pixels or so you could average the number of transitions you count and round to get your final count 

 

i'd be interested to see the output images from each step including the Sobel operator
0 Kudos
Reply