The C++ article polarToCart() is used to calculate the x and y co-ordinates from the given magnitude and angle.This can particularly be used in object detection when we specifiacally want to locate a specific part out of the entire object.The input is in two arrays, magnitude and angle, of the same size and type, specifying the magnitude and angle of the field at every point. The output is similarly two arrays that will be of the same size and type as the inputs, and which will contain the x and y projections of the vector at each point. The additional flag angleInDegrees will cause the angle array to be interpreted as angles in degrees rather than in radians.

**Synatax:**

**void polarToCart(InputArray magnitude, InputArray angle, OutputArray x, OutputArray y, bool angleInDegrees=false)**

**Parameters:**

**magnitude**- input floating-point array of magnitudes of 2D vectors; it can be an empty matrix (=Mat()), in this case, the function assumes that all the magnitudes are =1; if it is not empty, it must have the same size and type as 'angle'.**angle**- input floating-point array of angles of 2D vectors.**x**- output array of x-coordinates of 2D vectors; it has the same size and type as 'angle'.**y**-output array of y-coordinates of 2D vectors; it has the same size and type as 'angle'.**angleInDegrees**- when true, the input angles are measured in degrees, otherwise, they are measured in radians.

- x(I)=magnitude(I)*cos(angle(I))
- y(i)=magnitude(I)*sin(angle(I))

Name | Views | Likes |
---|---|---|

C++ OpenCV cv::polarToCart() | 551 | 1 |

C++ OpenCV cv::sqrt() | 1930 | 1 |

C++ OpenCV cv::pow() | 1595 | 2 |

C++ Computer Vision and Origin Of OpenCV | 154 | 1 |

C++ Who Owns OpenCV | 169 | 1 |

C++ OpenCV Moving Around | 209 | 1 |

C++ OpenCV:Introduction | 178 | 1 |

OpenCV:Introduction | 142 | 1 |

C++ Boost Flyweight | 181 | 1 |

C++ Boost Function | 173 | 2 |

C++ Program to Display Prime Numbers Between Two Intervals | 749 | 2 |

## Comments