android - How detect long edges of wall to prepare mask and recolor -
main idea allow user recolor specific wall based user selection. have implemented feature using cvfloodfill (helps prepare mask image) can me change relative hsv value wall can retain edges. problem solution works on color , walls repainted instead of single wall selected user.
i have tried canny edge detection able detect edge not able convert area.
please find below code using 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 detect edges , corresponding area image.
i looking solution can other opencv should possible iphone , android

edit
i able achieve result 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 2 problem output not sure how resolve them 1. close near edges 2. remove small edges

i think might have solution you! there sample file called watershed.cpp in opencv, run , you'll result :

you can make user draw on screen discriminate each wall. if want more precise can outline areas (without touching other lines) :

and tada! :

with little work can make user-friendly (cancel last line, connect areas etc...)
hope helps!
Comments
Post a Comment