How to make edges of OpenCV skin detection output “smooth

By A Mystery Man Writer

I did skin detection with OpenCV, it is based on HSV color space: cvtColor(src, hsv, CV_BGR2HSV); inRange(hsv, Scalar(0, 48, 80), Scalar(20, 255, 255), bw); vector<vector<Point>> contours; vector<Vec4i> hierarchy; findContours(bw, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, Point(0, 0)); int s = findBiggestContour(contours); Mat output = Mat::zeros(src.size(), CV_8UC1); drawContours(output, contours, s, Scalar(255), -1, 8, hierarchy, 0, Point()); It finds the contour of the skin correctly, however, the edge of the output is not "smooth". Is there a way I can smooth the output contour (Please note "contours" is a vector of coordinates of the contour)? I want to "smooth" the output based on coordinates or black/white image, not by means of algorithms like "image blur". Any suggestions? It'll be kind if you show me some OpenCV codes.

OpenCV Edge Detection ( cv2.Canny ) - PyImageSearch

Image Transformations Using OpenCV in Python - Comet

Zero-parameter, automatic Canny edge detection with Python and OpenCV - PyImageSearch

Group 1) Fasecure – A live recognition and detection System – TUM OpenPower

Image Enhancement Techniques using OpenCV - Python - GeeksforGeeks

Image Styling & Cartoonify Flask web app using OpenCV in Python - Wisdom ML

How to smooth the edges of a low quality image? - OpenCV Q&A Forum

Edge Detection in Computer Vision using OpenCV

Exploring the Cutting-Edge Features of OpenCV (cv2): Empowering Computer Vision Like Never Before

Smoothing edges change black color - OpenCV Q&A Forum

Frontiers Design and implementation of real-time object detection system based on single-shoot detector and OpenCV

Opencv Python Tutroals, PDF, Python (Programming Language)

Electronics, Free Full-Text

Python OpenCV - Smoothing and Blurring - GeeksforGeeks

©2016-2024, travellemur.com, Inc. or its affiliates