How detect long edges of wall to prepare mask and recolor
android, edge-detection, image-processing, iphone, opencv
Solution
I think I might have the solution for you! There is a sample file called watershed.cpp in OpenCV, just run it and you'll get this result :
You can make your user draw on his screen to discriminate each wall. Then if you want something more precise you can outline the areas (without touching other lines) like this :
And TADA! :
With a little work you can make it user-friendly (cancel last line, connect areas etc...)
Hope that helps!
Problem
Main idea is to allow user to recolor to specific wall based user selection. Currently i have implemented this feature using `cvFloodFill` (helps to prepare mask image) which can help me to change relative `HSV` value for wall so i can retain edges. but problem with this solution is that it works on color and all walls are repainted instead of single wall selected by user. i have also tried canny edge detection but it just able to detect edge but not able to convert it to area. Please find below code which i am currently using for repaint function Prepare mask `cvFloodFill(mask, new CvPoint(295, 75), new CvScalar(255, 255, 255,0), cvScalarAll(1), cvScalarAll(1), null, 4, null);` split channel `cvSplit(hsvImage, hChannel, sChannel, vChannel, null);` change color `cvAddS(vChannel, new CvScalar(255*(0.76-0.40),0,0,0), vChannel, mask);` How can we detect edges and corresponding area from the image. i am looking for solution which can be other than `opencv` but should be possible for iPhone and android Edit i am able to achieve somewhat result as below image using below steps ``` cvCvtColor(image, gray, CV_BGR2GRAY); cvSmooth(gray,smooth,CV_GAUSSIAN,7,7,0,0); cvCanny(smooth, canny, 10, 250, 5); ``` there are two problem with this output not sure how to resolve them 1. close near by edges 2. remove small edges