Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I want to sovle this in C language. Problem: In today's lab, we discussed an engineering method to identify the iris/pupil boundary. It is an
I want to sovle this in C language.
Problem: In today's lab, we discussed an engineering method to identify the iris/pupil boundary. It is an easy step for us to accomplish visually, but segmentation is a very complex process to carry out automatically with a computer algorithm. For some analysis, a manual segmentation program is used in which a user is presented with an image of an eye on the screen, and the user then clicks on three points on the pupil boundary. With three points, the computer can compute the equation of the circle. Hence, we can then compute the equations of the circles that form the boundaries of the iris. With this information, we can extract the iris and continue the process of iris recognition. I have already given you the code for the function named "circle_x_coord" to compute the x coordinate of the center of a circle given three points on the circle. Your task is to make a main routine and call the function to compute yc (y coordinate of the center of a circle) and r (the radius of the circle). Three points are P1-(-1,-1); P2-(1,1) P3-(3,-1) Code for circle x coord function: float circle_x coord float x1, float yl, float x2, float y2, float x3, float y3) Declare variables. float xc _top, xc bottom, m12, m23 * Compute slopes of the two lines between points.*/ m 12-(y2-yl )(x2-x1 ); m23 (y3-y2)/(x3-x2) Compute the x coordinate of the center of the circle. xc top m12 m23*(y1-y3)+ m23*(xl+x2)-m12*(x2+x3); xc bottom 2*(m23-m12); xc-xc top/xc_bottom; Return the x coordinate of the center.*Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started