Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

vhdl coding for finding image centroid

Status
Not open for further replies.

ann mary

Newbie level 3
Joined
Jan 7, 2015
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
20
i am capturing an image of pixel size 10*10.using matlab software ,i have written codings to send and store the image data to bram of my fpga kit via RS232 interface.how to write the vhdl coding for finding the image centroid by extracting these image data from the BRAM(fpga contains 8 18kb BRAMs).
 

Usually, the best place to start is with a text editor.
Then you can code the VHDL to match the algorithm you wrote in matlab.
 

Yup, zero chance of finding working HDL code for centroids out in the wild. For some inspiration you can look at the relevant OpenCV code. Remember I said inspiration, not implementation. ;)
 

Hi ann mary,

an integral can be translated into a summation in the discrete world, but you should know the number of samples for the summation.

What is E(x,y)? Is it a pixel value?

Kind regards.
 

hello sir

i am taking 10 samples.yes sir.it is the pixel value.how to write the coding using this formula.

thanking you.
 

You just have to do three summations M00, M01 and M10. Then 2 divisions and Bob's your Uncle. It's not super complicated. Instead of that formula you posted maybe it helps if you take a look at the discrete form.

See the sums here: https://en.wikipedia.org/wiki/Image_moment#Raw_moments

You have to loop over (x,y) coordinates of your image region and for every (x,y) coordinate you simultaneously do the work (as in multiply-accumulate) for the M00,M01 and M10 sums. And then when all sums are completed you do a division for each axis.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top