1

I am new to OpenCV. I have a project to detect wall, floor and roof in a room picture and apply color or texture according to the selection. I searched alot in the Internet, but couldn't find a good one.

I also tried a pixel method to color the background, but then it doesn't give the feel of a room. Please can someone help me in this regard or share me the code if you don't mind. Thanks in Advance.

Theebikka
  • 21
  • 2
  • I am just looking for an output just like (http://stackoverflow.com/questions/15082025/color-replacement-in-image-for-iphone-application) but I should be able to edit wall, floor and roof :( Please help – Theebikka Jun 14 '16 at 07:12

1 Answers1

1

For realistic results you need to:

1) Recognize what is and isn't part of that surface. If the lighting or texture are anything less than perfectly flat, this becomes an exercise in edge detection -- or asking the user to help outline the affected area.

2) Recognize what variations are part of the surface texture and should be removed, versus which are lighting effects and must be retained and applied to the new surface treatment.

3) If the new surface has texture, recognize what the size and orientation of this surface is, so you know how scale/stretch/skew the texture to correctly reflect perspective and dimensions.

4) use all that information to process your new texture onto the area of the image occupied by that surface.

Doing a manually assisted version of this isn't bad; it's a suitable final project for an introductory class in image processing. Automating it gets tough.

The various manufacturers of wall treatments, shingles, siding and so on sometimes offer free tools which will do some of this. There are also some tools that take semi-standardized data files from manufacturers and do this; a reduced-function version of that may be available as freeware. I'd suggest doing some market research -- find and try out a few of those, decide what you do and don't like about them, and use that to guide your own design.

There's also going to be a lot of discussion of this sort of process in older editions of the SIGGRAPH proceedings, back when we were still figuring all of this out. Some books on computer graphics may also discuss texture replacement.

Have fun!

keshlam
  • 7,931
  • 2
  • 19
  • 33
  • Hi, Thanks for your idea. I will definitely follow them. By the way, do you have any code for "Mean Shift" algorithm by Comaniciu and Meers? – Theebikka Jun 14 '16 at 07:39
  • Asking others to write your assignment for you is off-topic here. – keshlam Jun 14 '16 at 12:26