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.

Calculation of tan_inverse(gy/gx) in VHDL.

Status
Not open for further replies.

Nandita16

Newbie level 3
Joined
Apr 4, 2016
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
22
Code for Edge Direction "tan_inverse(Gy/Gx)" in VHDL for implementing NMS in Canny.

I am implementing canny edge detection in VHDL.
I have successfully calculated gradient ie. G=|Gx+Gy| but now to proceed further to Non-Maximum Suppression ,I need to calculate edge direction ie.

Thetha=Tan_inverse(Gy/Gx).

Please help me how i can do this as in need floating Point division for Gy/Gx.
Thanking you in anticipation.
 

Re: Code for Edge Direction "tan_inverse(Gy/Gx)" in VHDL for implementing NMS in Cann

You surely want fixed point rather than floating point arithmetic. Thinking about reasonable number formats and required accuracy would be a first step to approach a VHDL implementation of your problem. Also intended processing speed plays a role, do you need a pipelined parallel divider or can a serial divider be used?

I implemented a similar atan2(a/b) function with an octant (0..45°) atan ROM table, a/b <> b/a permutation, linear interpolation and the below mapping
Code:
--sign u_a sign_ub |u_b|>|u_a|  gamma
--   0        0        0        0   + phi_8
--   0        0        1        90  - phi_8 
--   1        0        1        90  + phi_8
--   1        0        0        180 - phi_8
--   1        1        0        180 + phi_8
--   1        1        1        270 - phi_8
--   0        1        1        270 + phi_8     
--   0        1        0        0   - phi_8

I'm not sure if atan2 is actually required for edge detection, I guess there are simpler methods.
 

Re: Code for Edge Direction "tan_inverse(Gy/Gx)" in VHDL for implementing NMS in Cann

Sir right now i just need a code to proceed further. Either its serial or its parallel. I want to implement Tan_inverse(Gy/Gx). And I think for this we need floating point division only as Gy/Gx can be any no. either integer or float. So sir kindly suggest some code snippets to help me.
Thanks for your reply. Hope to have sooner response.
 

I want to calculate Tan_inverse(gy/gx) in VHDL. Please help me with the code of the same.
Thank you.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top