Basic Image AlgorithmS Library
2.8.0
|
class for handling different region of interest (ROI) representations... More...
#include <Base/Image/ROI.hh>
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
void | Erode (const ROI &src, const unsigned half_mask_size) |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
long int | Name2DebugLevel (const std::string &name) const |
looks up a debuglevel in the internal map, returns 0 if not found More... | |
long int | NewDebugLevel (const std::string &name) |
creates a new debuglevel More... | |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
construction and destruction | |
~ROI () | |
destructor More... | |
ROI () | |
str. constructor More... | |
ROI (const ROI &roi) | |
calls operator= More... | |
void | Release () |
Deletes internal memory, sets mask and vector invalid. More... | |
void | Resize (unsigned width, unsigned height) |
Resizes parent image. More... | |
void | UnsetROI () |
Delete region of interest. More... | |
ROI & | operator= (const ROI &roi) |
assignment operator More... | |
void | SetROIType (const enum ERoiType &type) |
alloc and free of internal memory More... | |
bool | operator== (const ROI &roi) const |
comparison More... | |
bool | operator!= (const ROI &roi) const |
access function | |
int | SetCorners (unsigned UpperLeftX, unsigned UpperLeftY, unsigned LowerRightX, unsigned LowerRightY) |
Sets a rectangular region of interest. More... | |
void | GetCorners (unsigned &UpperLeftX, unsigned &UpperLeftY, unsigned &LowerRightX, unsigned &LowerRightY) const |
Return the region of interest, by saving the coordinates within the variables defined by the parameters. More... | |
void | GetCorners (int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const |
Return the region of interest, by saving the coordinates within the variables defined by the parameters. More... | |
unsigned | GetCornerUpperLeftX () const |
fetch individual ROI corner coordinate More... | |
unsigned | GetCornerUpperLeftY () const |
fetch individual ROI corner coordinate More... | |
unsigned | GetCornerLowerRightX () const |
fetch individual ROI corner coordinate More... | |
unsigned | GetCornerLowerRightY () const |
fetch individual ROI corner coordinate More... | |
bool | IsInROI (const double &x, const double &y) const |
ROI check if pixel position is inside the ROI. More... | |
bool | IsInROI (const double &left, const double &top, const double &right, const double &bottom) const |
ROI check if rectangular window is inside the ROI. More... | |
int | GetMaskImage (ImageBase &im) const |
returns an image of StorageType unsigned char, where every pixel not in the ROI is set to UCHAR_MAX and every other pixel to 0 More... | |
int | SetMaskImage (const ImageBase &im) |
every pixel with value==0.0 is in the ROI, every pixel with value!=0.0 is not in the ROI More... | |
void | SetMask (const unsigned &x, const unsigned &y, const bool val) |
Direct access to the mask data. More... | |
bool | Mask (const unsigned &x, const unsigned &y) const |
Direct access to the mask data, const version. More... | |
void | SetVector (std::vector< Position > &pos) |
Sets MaskValid_=false and VectorValid_=true. More... | |
std::vector< Position > * | GetVector () |
returns a pointer to the vector representation of the ROI More... | |
bool | GetVector (std::vector< Position > &vec) const |
get a copy of mask vector. More... | |
unsigned | GetWidth () const |
width capacity of roi (image width) More... | |
unsigned | GetHeight () const |
height capacity of roi (image height) More... | |
bool | GetRows (std::vector< unsigned > &start, std::vector< unsigned > &end) const |
Horizontal start and end position per image row, the length of the vectors always corresponds to the image height. More... | |
void | SetRows (const std::vector< unsigned > &start, const std::vector< unsigned > &end) |
Horizontal start and end position per image row, the length of the vectors always corresponds to the image height. More... | |
interpolation | |
bool | CheckBilinearInterpolation (const double x, const double y) const |
Check if subpixel position (x,y) in ROI is valid for bilinear interpolation (i.e. More... | |
bool | CheckBicubicInterpolation (const double x, const double y) const |
Check if subpixel position (x,y) in ROI is valid for bicubic interpolation (i.e. More... | |
int | GetBilinearInterpolationNeighbors (const double x, const double y, std::vector< int > &nx, std::vector< int > &ny) const |
Get valid neighbor pixels in ROI for bilinear interpolation at subpixel position (x,y). More... | |
checking | |
enum ERoiType | GetROIType () const |
is the mask image valid? More... | |
bool | MaskValid () const |
is the position vector valid? More... | |
bool | VectorValid () const |
is the position vector valid? More... | |
bool | SameSize (const ROI &roi) const |
Returns true if both ROIs have the same size. More... | |
conversion functions | |
int | ConvertROIType (const enum ERoiType &type) |
Generic conversion function from current ROI representation to the given ROI representation. More... | |
Static Public Member Functions | |
static long int | GetGlobalDebugLevel () |
static void | SetGlobalDebugLevel (long int lev) |
Protected Member Functions | |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
internal conversion functions | |
int | Corners2Mask_ () |
Fills mask representation of ROI from corner representation. More... | |
int | Corners2Vector_ () |
Fills vector representation of ROI from corner representation. More... | |
int | Corners2Rows_ () |
Fills rows representation of ROI from corner representation. More... | |
int | Mask2Corners_ () |
Fills corner/bounding box representation of ROI from mask representation. More... | |
int | Mask2Vector_ () |
Fills vector representation of ROI from mask representation. More... | |
int | Mask2Rows_ () |
Fills rows representation of ROI from mask representation. More... | |
int | Vector2Corners_ () |
Fills corner/bounding box representation of ROI from vector representation. More... | |
int | Vector2Mask_ () |
Fills vector representation of ROI from mask representation. More... | |
int | Vector2Rows_ () |
Fills rows representation of ROI from vector representation. More... | |
int | Rows2Corners_ () |
Fills corner representation of ROI from rows representation. More... | |
int | Rows2Mask_ () |
Fills mask representation of ROI from rows representation. More... | |
int | Rows2Vector_ () |
Fills vector representation of ROI from rows representation. More... | |
Protected Attributes | |
long int | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
std::map< std::string, long int > | _String2Debuglevel |
unsigned | Height_ |
unsigned | LowerRightX_ |
unsigned | LowerRightY_ |
std::vector< bool > | Mask_ |
internal data for ROI of type ROI_Mask the mask data: Mask_[y*Width_+x] corresponds to pixel at (x,y) a bool vector is used, because the bool std::vector is internally stored as a bitfield More... | |
enum ERoiType | RoiType_ |
which method is used to store the ROI More... | |
std::vector< unsigned > | RowEnd_ |
std::vector< unsigned > | RowStart_ |
internal data for ROI of type ROI_Rows the ROI is specified by a min and a max value for each row in the image More... | |
unsigned | UpperLeftX_ |
internal data for ROI of type ROI_Corners rectangular region of interest defined by upper left and lower right corners. More... | |
unsigned | UpperLeftY_ |
std::vector< Position > | Vector_ |
internal data for ROI of type ROI_Points Vector instance of ROI, always sorted from top left to bottom right More... | |
unsigned | Width_ |
maximum dimension of roi data More... | |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
static const int | Version_ = ROI_VERSION_NUMBER |
version number of ROI class More... | |
io functions | |
int | WriteBinary (std::ostream &os) const |
binary output to stream More... | |
int | ReadBinary (std::istream &is) |
binary input from stream More... | |
BIASImageBase_EXPORT std::ostream & | operator<< (std::ostream &os, const ROI &roi) |
human readable output operator for ROI, mainly for debugging More... | |
class for handling different region of interest (ROI) representations...
The ROI class usually is member of an ImageBase and is stored together with the ImageBase. If an ImageBase is written to disk in the binary mip format, the ROI member is also automatically written in the same file.
Flags indication the validity of the single representations exist within the ROI class.
Right now, three different representations are possible:
The ROI class can later on be expanded in a way, that the vector does not only hold positions, but maybe somthing like more complex mask patches...
ROI::ROI | ( | ) |
str. constructor
Definition at line 122 of file ROI.cpp.
References BIAS::Debug::NewDebugLevel(), and UnsetROI().
ROI::ROI | ( | const ROI & | roi | ) |
calls operator=
Definition at line 131 of file ROI.cpp.
References BIAS::Debug::NewDebugLevel(), and operator=().
|
inlineinherited |
Definition at line 355 of file Debug.hh.
Referenced by BIAS::GLProjectionParametersBase::AddDebugLevel(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::ShowCamWxVideoSourceFactory::OpenDevice(), and BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph().
|
inlineinherited |
|
inline |
|
inline |
|
inlineprotectedinherited |
int ROI::ConvertROIType | ( | const enum ERoiType & | type | ) |
Generic conversion function from current ROI representation to the given ROI representation.
Definition at line 720 of file ROI.cpp.
References Corners2Mask_(), Corners2Rows_(), Corners2Vector_(), Mask2Corners_(), Mask2Rows_(), Mask2Vector_(), BIAS::ROI_Corners, BIAS::ROI_Mask, BIAS::ROI_Points, BIAS::ROI_Rows, RoiType_, Rows2Corners_(), Rows2Mask_(), Rows2Vector_(), Vector2Corners_(), Vector2Mask_(), and Vector2Rows_().
|
protected |
Fills mask representation of ROI from corner representation.
Definition at line 780 of file ROI.cpp.
References BIAS::ROI_Corners, and RoiType_.
Referenced by ConvertROIType().
|
protected |
Fills rows representation of ROI from corner representation.
Definition at line 794 of file ROI.cpp.
References BIAS::ROI_Corners, and RoiType_.
Referenced by ConvertROIType().
|
protected |
Fills vector representation of ROI from corner representation.
Definition at line 787 of file ROI.cpp.
References BIAS::ROI_Corners, and RoiType_.
Referenced by ConvertROIType().
|
inlineinherited |
Definition at line 341 of file Debug.hh.
Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::MonteCarloTransform::GetSamples_(), and BIAS::MonteCarloTransform::Transform().
|
inlineinherited |
void ROI::Erode | ( | const ROI & | src, |
const unsigned | half_mask_size | ||
) |
Definition at line 926 of file ROI.cpp.
References Height_, IsInROI(), LowerRightX_, LowerRightY_, BIAS::ROI_Corners, BIAS::ROI_Mask, BIAS::ROI_Points, BIAS::ROI_Rows, RoiType_, RowEnd_, RowStart_, UpperLeftX_, UpperLeftY_, and Width_.
|
inline |
|
inline |
fetch individual ROI corner coordinate
efficient inline access, used by BackwardMapping in most inner loop
Definition at line 201 of file ROI.hh.
Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTrilinearGreySimple_().
|
inline |
fetch individual ROI corner coordinate
efficient inline access, used by BackwardMapping in most inner loop
Definition at line 207 of file ROI.hh.
Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTrilinearGreySimple_().
|
inline |
Return the region of interest, by saving the coordinates within the variables defined by the parameters.
[out] | UpperLeftX,UpperLeftY,: | first corner (x,y) of ROI (start), included in ROI |
[out] | LowerRightX,LowerRightY,: | lower right corner (x,y) of ROI (end), NOT included in ROI |
Definition at line 443 of file ROI.hh.
References LowerRightX_, LowerRightY_, UpperLeftX_, and UpperLeftY_.
Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ExtractLocalMaxima(), BIAS::Rescale< InputStorageType, OutputStorageType >::_FillInterpolated(), BIAS::Rescale< InputStorageType, OutputStorageType >::_FillInterpolatedColor(), BIAS::Rescale< InputStorageType, OutputStorageType >::_FillInterpolatedGrey(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::MixtureOfGaussians< StorageType >::Apply(), BIAS::ImageConvert::ConvertST(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::FilterBase< InputStorageType, OutputStorageType >::CopyNonROIFromSource(), BIAS::ImageBase::Cut2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Median< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::Label::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::GaussThreshold< InputStorageType, OutputStorageType >::Filter7x7GreyIgnoreBelowThreshold(), BIAS::GaussThreshold< InputStorageType, OutputStorageType >::Filter7x7GreyOnlyBelowThreshold(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImageBase::GetCopyOfROI2(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetROILowerRightX(), BIAS::ImageBase::GetROILowerRightY(), BIAS::ImageBase::GetROIUpperLeftX(), BIAS::ImageBase::GetROIUpperLeftY(), BIAS::TrackerBaseInterface< StorageType >::Init(), BIAS::Label::LabelInit_(), BIAS::ForwardMappingNearestNeighbour< InputStorageType, OutputStorageType >::Map(), BIAS::ImageConvertThreaded::MergeImage_(), BIAS::ImageCanvas::PaintRoiOnDc_(), BIAS::ImageBase::Paste2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Label::Process(), BIAS::FilterBase< InputStorageType, OutputStorageType >::SetNonROIToValue(), BIAS::ImageBase::SetOutsideROIZero(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::ShrinkROI_(), BIAS::HessianSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::HessianSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::ImageConvertThreaded::SplitImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax().
|
inline |
Return the region of interest, by saving the coordinates within the variables defined by the parameters.
[out] | UpperLeftX,UpperLeftY,: | first corner (x,y) of ROI (start), included in ROI |
[out] | LowerRightX,LowerRightY,: | lower right corner (x,y) of ROI (end), NOT included in ROI |
Definition at line 453 of file ROI.hh.
References LowerRightX_, LowerRightY_, UpperLeftX_, and UpperLeftY_.
|
inline |
fetch individual ROI corner coordinate
efficient inline access, used by BackwardMapping in most inner loop
Definition at line 189 of file ROI.hh.
Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTrilinearGreySimple_().
|
inline |
fetch individual ROI corner coordinate
efficient inline access, used by BackwardMapping in most inner loop
Definition at line 195 of file ROI.hh.
Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTrilinearGreySimple_().
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inline |
height capacity of roi (image height)
Definition at line 254 of file ROI.hh.
Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ExtractLocalMaxima(), and Vector2Mask_().
int ROI::GetMaskImage | ( | ImageBase & | im | ) | const |
returns an image of StorageType unsigned char, where every pixel not in the ROI is set to UCHAR_MAX and every other pixel to 0
Definition at line 369 of file ROI.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), Height_, BIAS::ImageBase::Init(), BIAS::ImageBase::IsEmpty(), Mask(), BIAS::ImageBase::Release(), BIAS::ROI_Mask, RoiType_, BIAS::ImageBase::ST_invalid, BIAS::ImageBase::ST_unsignedchar, and Width_.
Referenced by BIAS::BlobDetectorLevelSet< StorageType >::Set().
|
inline |
is the mask image valid?
Definition at line 303 of file ROI.hh.
Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ExtractLocalMaxima(), BIAS::PyramidImage< StorageType >::Init(), BIAS::ImageCanvas::PaintRoiOnDc_(), BIAS::PyramidImage< StorageType >::SetROI(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::ShrinkROI_().
|
inline |
Horizontal start and end position per image row, the length of the vectors always corresponds to the image height.
When no pixels in a certain row y are located inside the roi, both start[y] and end[y] are zero.
Definition at line 261 of file ROI.hh.
References BIAS::ROI_Rows.
Referenced by BIAS::ImageCanvas::PaintRoiOnDc_(), BIAS::PyramidImage< StorageType >::SetROI(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::ShrinkROI_().
|
inline |
returns a pointer to the vector representation of the ROI
Definition at line 242 of file ROI.hh.
References BIAS::ROI_Points.
Referenced by Vector2Mask_().
bool ROI::GetVector | ( | std::vector< Position > & | vec | ) | const |
get a copy of mask vector.
Returns true if vector is valid
Definition at line 471 of file ROI.cpp.
References BIAS::ROI_Points, RoiType_, and Vector_.
|
inline |
width capacity of roi (image width)
Definition at line 250 of file ROI.hh.
Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ExtractLocalMaxima(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTrilinearGreySimple_(), and Vector2Mask_().
|
inline |
ROI check if pixel position is inside the ROI.
Definition at line 463 of file ROI.hh.
References Height_, LowerRightX_, LowerRightY_, Mask(), BIAS::ROI_Corners, BIAS::ROI_Mask, BIAS::ROI_Points, BIAS::ROI_Rows, RoiType_, RowEnd_, RowStart_, UpperLeftX_, UpperLeftY_, Vector_, and Width_.
Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ExtractLocalMaxima(), BIAS::HistogramEqualization< InputStorageType, OutputStorageType >::AdaptiveHistogramEqualization(), BIAS::HistogramImage::AddHist(), CheckBicubicInterpolation(), CheckBilinearInterpolation(), Erode(), BIAS::HistogramEqualization< InputStorageType, OutputStorageType >::Filter(), GetBilinearInterpolationNeighbors(), and BIAS::ImageBase::SetOutsideROIZero().
|
inline |
ROI check if rectangular window is inside the ROI.
Definition at line 505 of file ROI.hh.
References Height_, LowerRightX_, LowerRightY_, Mask(), BIAS::ROI_Corners, BIAS::ROI_Mask, BIAS::ROI_Points, BIAS::ROI_Rows, RoiType_, RowEnd_, RowStart_, UpperLeftX_, UpperLeftY_, Vector_, and Width_.
bool ROI::Mask | ( | const unsigned & | x, |
const unsigned & | y | ||
) | const |
Direct access to the mask data, const version.
Definition at line 488 of file ROI.cpp.
References Height_, Mask_, BIAS::ROI_Mask, RoiType_, and Width_.
Referenced by GetMaskImage(), IsInROI(), and Mask2Vector_().
|
protected |
Fills corner/bounding box representation of ROI from mask representation.
Returns 0 if mask is valid.
Definition at line 801 of file ROI.cpp.
Referenced by ConvertROIType().
|
protected |
Fills rows representation of ROI from mask representation.
Definition at line 828 of file ROI.cpp.
Referenced by ConvertROIType().
|
protected |
Fills vector representation of ROI from mask representation.
Returns 0 if mask is valid. Sets VectorValid flag if maks is valid.
Definition at line 808 of file ROI.cpp.
References Height_, Mask(), BIAS::ROI_Mask, RoiType_, SetVector(), and Width_.
Referenced by ConvertROIType().
|
inline |
is the position vector valid?
Definition at line 307 of file ROI.hh.
References BIAS::ROI_Mask.
Referenced by BIAS::BlobDetectorLevelSet< StorageType >::Detect(), ReadBinary(), and BIAS::BlobDetectorLevelSet< StorageType >::Set().
|
inlineinherited |
|
inlineinherited |
creates a new debuglevel
Definition at line 474 of file Debug.hh.
Referenced by BIAS::COSAC< SolutionType >::COSAC(), BIAS::ProjectionParametersPerspectiveDepth::Init(), BIAS::MonteCarloTransform::MonteCarloTransform(), BIAS::PMatrixEstimation::PMatrixEstimation(), BIAS::PreemptiveRANSAC< SolutionType >::PreemptiveRANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge(), ROI(), BIAS::RotationAveraging::RotationAveraging(), BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph(), BIAS::ThreeDOutOpenSceneGraph::ThreeDOutOpenSceneGraph(), BIAS::Triangulation::Triangulation(), and BIAS::UnscentedTransform::UnscentedTransform().
assignment operator
Definition at line 155 of file ROI.cpp.
References Height_, LowerRightX_, LowerRightY_, Mask_, RoiType_, RowEnd_, RowStart_, UpperLeftX_, UpperLeftY_, Vector_, and Width_.
Referenced by ROI().
bool ROI::operator== | ( | const ROI & | roi | ) | const |
comparison
Definition at line 173 of file ROI.cpp.
References LowerRightX_, LowerRightY_, Mask_, BIAS::ROI_Corners, BIAS::ROI_Mask, BIAS::ROI_Points, BIAS::ROI_Rows, RoiType_, RowEnd_, RowStart_, UpperLeftX_, UpperLeftY_, and Vector_.
|
inlineinherited |
int ROI::ReadBinary | ( | std::istream & | is | ) |
binary input from stream
Definition at line 573 of file ROI.cpp.
References Height_, LowerRightX_, LowerRightY_, MaskValid(), Resize(), BIAS::ROI_Corners, BIAS::ROI_Mask, BIAS::ROI_Points, BIAS::ROI_Rows, RoiType_, RowEnd_, RowStart_, SetMask(), SetROIType(), UpperLeftX_, UpperLeftY_, Vector_, VectorValid(), and Width_.
Referenced by BIAS::operator>>().
void ROI::Release | ( | ) |
Deletes internal memory, sets mask and vector invalid.
Definition at line 141 of file ROI.cpp.
References Height_, LowerRightX_, LowerRightY_, Mask_, BIAS::ROI_Corners, RoiType_, RowEnd_, RowStart_, UpperLeftX_, UpperLeftY_, Vector_, and Width_.
Referenced by BIAS::ImageBase::Release(), and Resize().
|
inlineinherited |
|
inlineinherited |
void ROI::Resize | ( | unsigned | width, |
unsigned | height | ||
) |
Resizes parent image.
Unsets region of interest!
Definition at line 227 of file ROI.cpp.
References Height_, Release(), and Width_.
Referenced by BIAS::ImageBase::Cut2ROI(), BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::ImageBase::InitWithForeignData(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), and ReadBinary().
|
protected |
Fills corner representation of ROI from rows representation.
Definition at line 876 of file ROI.cpp.
References BIAS::ROI_Rows, and RoiType_.
Referenced by ConvertROIType().
|
protected |
Fills mask representation of ROI from rows representation.
Definition at line 883 of file ROI.cpp.
References BIAS::ROI_Rows, and RoiType_.
Referenced by ConvertROIType().
|
protected |
Fills vector representation of ROI from rows representation.
Definition at line 890 of file ROI.cpp.
References BIAS::ROI_Rows, and RoiType_.
Referenced by ConvertROIType().
bool ROI::SameSize | ( | const ROI & | roi | ) | const |
Returns true if both ROIs have the same size.
Only the rectangular ROI as defined by the corners is validated.
Definition at line 498 of file ROI.cpp.
References LowerRightX_, LowerRightY_, BIAS::ROI_Corners, RoiType_, UpperLeftX_, and UpperLeftY_.
int ROI::SetCorners | ( | unsigned | UpperLeftX, |
unsigned | UpperLeftY, | ||
unsigned | LowerRightX, | ||
unsigned | LowerRightY | ||
) |
Sets a rectangular region of interest.
[in] | UpperLeftX,UpperLeftY,: | first corner (x,y) of ROI (start), included in ROI |
[in] | LowerRightX,LowerRightY,: | lower right corner (x,y) of ROI (end), NOT included in ROI |
Definition at line 287 of file ROI.cpp.
References Height_, LowerRightX_, LowerRightY_, BIAS::ROI_Corners, SetROIType(), UpperLeftX_, UpperLeftY_, and Width_.
Referenced by BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageConvert::ConvertST(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Erosion< InputStorageType, OutputStorageType >::Filter(), BIAS::Dilation< InputStorageType, OutputStorageType >::Filter(), BIAS::Median< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::Label::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::GaussThreshold< InputStorageType, OutputStorageType >::Filter7x7GreyIgnoreBelowThreshold(), BIAS::GaussThreshold< InputStorageType, OutputStorageType >::Filter7x7GreyOnlyBelowThreshold(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), BIAS::ImageConvertThreaded::MergeImage_(), BIAS::operator>>(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::ImageBase::SetROICorners(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::ShrinkROI_(), BIAS::HessianSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::HessianSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::ImageConvertThreaded::SplitImage_(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax(), and Vector2Corners_().
|
inlineinherited |
Definition at line 318 of file Debug.hh.
Referenced by BIAS::ShowCamWxVideoSourceFactory::CreateBumbleBee(), BIAS::ShowCamWxVideoSourceFactory::CreateDCAM(), BIAS::VideoSource_MDcam::ScanBus(), BIAS::GLProjectionParametersBase::SetDebugLevel(), BIAS::VideoSource_Disk::VideoSource_Disk(), BIAS::VideoSource_DV2::VideoSource_DV2(), BIAS::VideoSource_DV::VideoSource_DV_Internal_Init_(), and BIAS::VideoSource_V4L::VideoSource_V4L().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
void ROI::SetMask | ( | const unsigned & | x, |
const unsigned & | y, | ||
const bool | val | ||
) |
Direct access to the mask data.
Definition at line 478 of file ROI.cpp.
References Height_, Mask_, BIAS::ROI_Mask, SetROIType(), and Width_.
Referenced by ReadBinary(), SetMaskImage(), and Vector2Mask_().
int ROI::SetMaskImage | ( | const ImageBase & | im | ) |
every pixel with value==0.0 is in the ROI, every pixel with value!=0.0 is not in the ROI
Definition at line 400 of file ROI.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), Height_, BIAS::ROI_Mask, SetMask(), SetROIType(), BIAS::ImageBase::ST_unsignedchar, and Width_.
void ROI::SetROIType | ( | const enum ERoiType & | type | ) |
alloc and free of internal memory
Definition at line 238 of file ROI.cpp.
References Height_, Mask_, BIAS::ROI_Corners, BIAS::ROI_Mask, BIAS::ROI_Points, BIAS::ROI_Rows, RoiType_, RowEnd_, RowStart_, and Width_.
Referenced by ReadBinary(), SetCorners(), SetMask(), SetMaskImage(), SetRows(), SetVector(), and Vector2Mask_().
void ROI::SetRows | ( | const std::vector< unsigned > & | start, |
const std::vector< unsigned > & | end | ||
) |
Horizontal start and end position per image row, the length of the vectors always corresponds to the image height.
When no pixels in a certain row y are located inside the roi, both start[y] and end[y] are zero.
Definition at line 436 of file ROI.cpp.
References Height_, BIAS::ROI_Rows, RowEnd_, RowStart_, SetROIType(), and Width_.
void ROI::SetVector | ( | std::vector< Position > & | pos | ) |
Sets MaskValid_=false and VectorValid_=true.
Copies pos -> Vector_. Sorts Vector_.
Definition at line 463 of file ROI.cpp.
References BIAS::ROI_Points, SetROIType(), and Vector_.
Referenced by Mask2Vector_().
|
inlineinherited |
void ROI::UnsetROI | ( | ) |
Delete region of interest.
Definition at line 214 of file ROI.cpp.
References Height_, LowerRightX_, LowerRightY_, Mask_, BIAS::ROI_Corners, RoiType_, RowEnd_, RowStart_, UpperLeftX_, UpperLeftY_, Vector_, and Width_.
Referenced by BIAS::ImageBase::ImageBase(), BIAS::ImageBase::Init(), BIAS::ImageBase::InitWithForeignData(), ROI(), and BIAS::ImageBase::UnsetROI().
|
protected |
Fills corner/bounding box representation of ROI from vector representation.
Returns 0 if vector is valid.
Definition at line 835 of file ROI.cpp.
References BIAS::ROI_Points, RoiType_, SetCorners(), and Vector_.
Referenced by ConvertROIType().
|
protected |
Fills vector representation of ROI from mask representation.
Returns 0 if vector is valid. Sets MaskValid flag if vector is valid.
Definition at line 846 of file ROI.cpp.
References GetHeight(), GetVector(), GetWidth(), Height_, BIAS::ROI_Mask, BIAS::ROI_Points, RoiType_, SetMask(), SetROIType(), and Width_.
Referenced by ConvertROIType().
|
protected |
Fills rows representation of ROI from vector representation.
Definition at line 869 of file ROI.cpp.
Referenced by ConvertROIType().
|
inline |
is the position vector valid?
Definition at line 311 of file ROI.hh.
References BIAS::ROI_Points.
Referenced by ReadBinary().
int ROI::WriteBinary | ( | std::ostream & | os | ) | const |
binary output to stream
Definition at line 507 of file ROI.cpp.
References Height_, LowerRightX_, LowerRightY_, Mask_, BIAS::ROI_Corners, BIAS::ROI_Mask, BIAS::ROI_Points, BIAS::ROI_Rows, RoiType_, RowEnd_, RowStart_, UpperLeftX_, UpperLeftY_, Vector_, Version_, and Width_.
Referenced by BIAS::operator<<().
|
friend |
human readable output operator for ROI, mainly for debugging
|
protectedinherited |
Definition at line 510 of file Debug.hh.
Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().
|
protectedinherited |
new concept, debuglevel are managed here in the debug class
Definition at line 516 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
|
protected |
Definition at line 356 of file ROI.hh.
Referenced by Erode(), GetMaskImage(), IsInROI(), Mask(), Mask2Vector_(), BIAS::operator<<(), operator=(), ReadBinary(), Release(), Resize(), SetCorners(), SetMask(), SetMaskImage(), SetROIType(), SetRows(), UnsetROI(), Vector2Mask_(), and WriteBinary().
|
protected |
Definition at line 363 of file ROI.hh.
Referenced by Erode(), GetCorners(), IsInROI(), BIAS::operator<<(), operator=(), operator==(), ReadBinary(), Release(), SameSize(), SetCorners(), UnsetROI(), and WriteBinary().
|
protected |
Definition at line 363 of file ROI.hh.
Referenced by Erode(), GetCorners(), IsInROI(), BIAS::operator<<(), operator=(), operator==(), ReadBinary(), Release(), SameSize(), SetCorners(), UnsetROI(), and WriteBinary().
|
protected |
internal data for ROI of type ROI_Mask the mask data: Mask_[y*Width_+x] corresponds to pixel at (x,y) a bool vector is used, because the bool std::vector is internally stored as a bitfield
Definition at line 369 of file ROI.hh.
Referenced by Mask(), operator=(), operator==(), Release(), SetMask(), SetROIType(), UnsetROI(), and WriteBinary().
|
protected |
which method is used to store the ROI
Definition at line 354 of file ROI.hh.
Referenced by ConvertROIType(), Corners2Mask_(), Corners2Rows_(), Corners2Vector_(), Erode(), GetMaskImage(), GetVector(), IsInROI(), Mask(), Mask2Vector_(), BIAS::operator<<(), operator=(), operator==(), ReadBinary(), Release(), Rows2Corners_(), Rows2Mask_(), Rows2Vector_(), SameSize(), SetROIType(), UnsetROI(), Vector2Corners_(), Vector2Mask_(), and WriteBinary().
|
protected |
Definition at line 377 of file ROI.hh.
Referenced by Erode(), IsInROI(), BIAS::operator<<(), operator=(), operator==(), ReadBinary(), Release(), SetROIType(), SetRows(), UnsetROI(), and WriteBinary().
|
protected |
internal data for ROI of type ROI_Rows the ROI is specified by a min and a max value for each row in the image
Definition at line 377 of file ROI.hh.
Referenced by Erode(), IsInROI(), BIAS::operator<<(), operator=(), operator==(), ReadBinary(), Release(), SetROIType(), SetRows(), UnsetROI(), and WriteBinary().
|
protected |
internal data for ROI of type ROI_Corners rectangular region of interest defined by upper left and lower right corners.
The upperleft corner is part of the rectangle, while the lower is just outside
Definition at line 362 of file ROI.hh.
Referenced by Erode(), GetCorners(), IsInROI(), BIAS::operator<<(), operator=(), operator==(), ReadBinary(), Release(), SameSize(), SetCorners(), UnsetROI(), and WriteBinary().
|
protected |
Definition at line 362 of file ROI.hh.
Referenced by Erode(), GetCorners(), IsInROI(), BIAS::operator<<(), operator=(), operator==(), ReadBinary(), Release(), SameSize(), SetCorners(), UnsetROI(), and WriteBinary().
|
protected |
internal data for ROI of type ROI_Points Vector instance of ROI, always sorted from top left to bottom right
Definition at line 373 of file ROI.hh.
Referenced by GetVector(), IsInROI(), BIAS::operator<<(), operator=(), operator==(), ReadBinary(), Release(), SetVector(), UnsetROI(), Vector2Corners_(), and WriteBinary().
|
staticprotected |
|
protected |
maximum dimension of roi data
Definition at line 356 of file ROI.hh.
Referenced by Erode(), GetMaskImage(), IsInROI(), Mask(), Mask2Vector_(), BIAS::operator<<(), operator=(), ReadBinary(), Release(), Resize(), SetCorners(), SetMask(), SetMaskImage(), SetROIType(), SetRows(), UnsetROI(), Vector2Mask_(), and WriteBinary().