Borrar filtros
Borrar filtros

How to extract an image?

3 visualizaciones (últimos 30 días)
Darsana P M
Darsana P M el 20 de Nov. de 2016
Comentada: Image Analyst el 20 de Nov. de 2016
The black region is the road and white region is the surrounding. I need to extract the black region alone and display the road. Can anybody help me with the matlab code?
[Edit by Image Analyst -- images inserted]

Respuestas (1)

Image Analyst
Image Analyst el 20 de Nov. de 2016
We can't see your .fig files. Attach PNG format images with the green and brown frame icon. Until then, see my Image Segmentation tutorial or color segmentation tutorials: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
Or else see the Color Thresholder on the Apps tab of the tool ribbon.
  2 comentarios
Darsana P M
Darsana P M el 20 de Nov. de 2016
i have made the image in png format
Image Analyst
Image Analyst el 20 de Nov. de 2016
I did what I was hoping you'd do up top on your original post.
15.3.3 Road, Path Following Operators
15.3.3.1 Road Following, Depth, Stereo Based, Off-Road, Safe Path
15.3.3.2 Ground Plane Detection
15.3.3.3 Lane Detection, Lane Following, White Line Detection
15.3.3.4 Indoor Navigation Issues, Lines, Walls, Doors, Flat Surfaces
15.3.3.5 CMU Road Followers, ALVINN YARF MANIAC
15.3.3.6 Obstacle Dectection, Other Vehicles, Objects on the Road
15.3.3.6.1 Collision Avoidance, Collision Detection, Vehicles, Objects on the Road
15.3.3.6.2 Obstacles, Objects on the Road Using Radar, Sonar, Active Vision
15.3.3.7 Airplane Obstacles, Collision Detection, Sense and Avoid, Aircraft Landings
15.3.3.8 Road Signs, Traffic Signs, Traffic Lights, Objects along the Road, Inspections
To mask your image so that the road shows up in full RGB and elsewhere is blackened, starting with your binaryImage, you can do it like this:
mask = ~binaryImage; % Invert it so the road is white
% Mask the image using bsxfun() function
maskedRgbImage = bsxfun(@times, rgbImage, cast(mask, 'like', rgbImage));

Iniciar sesión para comentar.

Categorías

Más información sobre Image Data Workflows en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by