|
Jafar
|
Class Grabber This class operates on an image and extracts the region of interest on either a clear or a dark region. More...
Class Grabber This class operates on an image and extracts the region of interest on either a clear or a dark region.
The only assumptions are: the object lies in this region and it is the largest inner region i.e. the image is focused on the object.
Definition at line 29 of file grabber.hpp.
#include <grabber.hpp>
Public Types | |
| enum | surface_type { DARK, LIGHT } |
| tells if background of interest is rather dark or light | |
Public Member Functions | |
| Grabber (const image::Image &image, surface_type surface=LIGHT) | |
| constructor that takes an image | |
| Grabber (const std::string &imageFile, surface_type surface=LIGHT) | |
| constructor that takes the image file name | |
| void | run () |
| finds contours of interest then runs grab cut algo on source image | |
| const image::Image & | source () const |
| const image::Image & | result () const |
| void | writeImages (const std::string &srcFileName="source.png", const std::string &objFileName="result.png") |
| writes both images (source and segmented) into files. | |
| const cv::Rect & | backgroundBorders () const |
| const cv::Rect & | objectBorders () const |
Private Member Functions | |
| void | findContoursOfInterest () |
| finds the contours of the background and plausible object | |
| void | grab () |
| apply grabcut algo on the image | |
Private Attributes | |
| jafar::image::Image | m_image |
| jafar::image::Image | m_result |
| std::multimap< unsigned int, int > | boxes |
| cv::Rect | largest |
| cv::Rect | plausible |
| surface_type | m_surface |
| type of the surface | |
| const cv::Rect& jafar::cutter::Grabber::backgroundBorders | ( | ) | const |
| const cv::Rect& jafar::cutter::Grabber::objectBorders | ( | ) | const |
| const image::Image& jafar::cutter::Grabber::result | ( | ) | const |
| const image::Image& jafar::cutter::Grabber::source | ( | ) | const |
| void jafar::cutter::Grabber::writeImages | ( | const std::string & | srcFileName = "source.png", |
| const std::string & | objFileName = "result.png" |
||
| ) |
writes both images (source and segmented) into files.
It is a dummy solution to avoid headache in scripting.
| Generated on Wed Oct 15 2014 00:37:33 for Jafar by doxygen 1.7.6.1 |
|