বৃত্ত আঁকার জন্য কেন্দ্র বিন্দু এবং ব্যাসার্ধ (radius) প্রয়োজন। OpenCV-এ circle() ফাংশন <imgproc.hpp> হেডারে সংজ্ঞায়িত।
সিনট্যাক্স
circle(matrix, center, radius, color, thickness);
উদাহরণ কোড
#include <iostream>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
using namespace cv;
using namespace std;
int main() {
Mat whiteMatrix(200, 200, CV_8UC3, Scalar(255, 255, 255));
Point center(100, 100); // কেন্দ্র বিন্দু
int radius = 50; // ব্যাসার্ধ
Scalar line_Color(0, 0, 0); // কালো রঙ
int thickness = 2; // লাইন জোর
namedWindow("whiteMatrix");
circle(whiteMatrix, center, radius, line_Color, thickness);
imshow("WhiteMatrix", whiteMatrix);
waitKey(0);
return 0;
}
আউটপুট

সাদা ব্যাকগ্রাউন্ডে কালো বৃত্ত দেখা যাচ্ছে।