How to extract an image?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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]
0 Commenti
Risposte (1)
Image Analyst
il 20 Nov 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 Commenti
Image Analyst
il 20 Nov 2016
I did what I was hoping you'd do up top on your original post.
You can find lane marker finding and road following papers here: http://www.visionbib.com/bibliography/contentsactive.html#Active%20Vision,%20Camera%20Calibration,%20Mobile%20Robots,%20Navigation,%20Road%20Following
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));
Vedere anche
Categorie
Scopri di più su Feature Detection and Extraction in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!