# Revision history [back]

You can't use cv::contourArea with cv::Canny because you need a set of contour coordinates (X, Y). Canny will give you edge values (gray values). It will also rewrite your vector<vector<Point>> to Mat.

You have to use cv::findContours for that. Look here: Canny, here: Canny tutorial and here: findContours tutorial

You can't use cv::contourArea with cv::Canny because you need a set of contour coordinates (X, Y). Canny will give you edge values (gray values). It will also rewrite your vector<vector<Point>> to Matcv::Mat.

You have to use cv::findContours for that. Look here: Canny, here: Canny tutorial and here: findContours tutorial

You can't use cv::contourArea with cv::Canny because you need a set of contour coordinates (X, Y). Canny will give you edge values (gray values). It will also rewrite your vector<vector<Point>> to cv::Mat.

You have to use cv::findContours for that. Look here: Canny, here: Canny tutorial and here: findContours tutorial

Edit: I have answered you this question here so why do you start a new question. And as I see my crystall ball was right when it says that "you try to make contourArea() on your (a) whole image"

You can't use cv::contourArea with cv::Canny because you need a set of contour coordinates (X, Y). Canny will give you edge values (gray values). It will also rewrite your vector<vector<Point>> to cv::Mat.

You have to use cv::findContours for that. Look here: Canny, here: Canny tutorial and here: findContours tutorial

Edit: I have answered you this question here so why do you start a new question. And as I see my crystall ball was right when it says that "you try to make contourArea() on your (a) whole image"

You can't use cv::contourArea with cv::Canny because you need a set of contour coordinates (X, Y). Canny will give you edge values (gray values). It will also rewrite your vector<vector<Point>> to cv::Mat.

You have to use cv::findContours for that. Look here: Canny, here: Canny tutorial and here: findContours tutorial

Edit: I have answered you this question here so why do you start a new question. And as I see my crystall crystal ball was right when it says that "you try to make contourArea() on your whole image"

You can't use cv::contourArea with cv::Canny because you need a set of contour coordinates (X, Y). Canny will give you edge values (gray values). It will also rewrite your vector<vector<Point>> to cv::Mat. inside the Canny function (InputArray), outside it can still look like a vector.

You have to use cv::findContours for that. Look here: Canny, here: Canny tutorial and here: findContours tutorial

Edit: I have answered you this question here so why do you start a new question. And as I see my crystal ball was right when it says that "you try to make contourArea() on your whole image"

You can't use cv::contourArea with cv::Canny because you need a set of contour coordinates (X, Y). Canny will give you edge values (gray values). (binary image). It will also rewrite your vector<vector<Point>> to cv::Mat inside the Canny function (InputArray), outside it can still look like a vector.

You have to use cv::findContours for that. Look here: Canny, here: Canny tutorial and here: findContours tutorial

Edit: I have answered you this question here so why do you start a new question. And as I see my crystal ball was right when it says that "you try to make contourArea() on your whole image"

You can't use cv::contourArea with cv::Canny because you need a set of contour coordinates (X, Y). Canny will give you edge values (binary image). It will also rewrite your vector<vector<Point>> to cv::Mat inside the Canny function (InputArray), outside it can still look like a vector.

You have to use cv::findContours for that. Look here: Canny, here: Canny tutorial and here: findContours tutorial

Edit: I have answered you this your question here so why do you start a new question. And as I see see, my crystal ball was right when it says that "you try to make contourArea() on your whole image"