My Project
Public Member Functions | Public Attributes | List of all members
PointBase Class Reference

class implemented as solution for the thesis providing stitching and stitching features More...

Public Member Functions

int load (string path)
 load the points from a database - necessary for the offline algorithm More...
 
void printPoints (int which=0)
 prints the points from the database into the terminal More...
 
string getPath (double x, double y)
 returns the path of a point specified by x and y values More...
 
void showPointImg ()
 shows the location of loaded points on an images More...
 
vector< Point2d > getAdjacents (Point2d inputPoint)
 DESTRUCTIVE!! - removes found adj. points from points vector, adds them to the toBeDone vector. More...
 
Mat rotate (Mat src, double angle)
 rotation function https://stackoverflow.com/questions/22041699/rotate-an-image-without-cropping-in-opencv-in-c More...
 
Mat dtBlend (Mat roi, Mat transformedRoi, bool showImg=false)
 blends using distance transform More...
 
Mat exposureBlend (Mat roi, Mat transformedRoi, bool showImg=false)
 
Mat pyramidBlend (Mat roi, Mat transformedRoi, bool showImg=false)
 blends using image pyramids transform More...
 
void stitchImgs ()
 stitches images using opencv pipeline More...
 
std::vector< double > getEdgeValues ()
 gets the values of the top right, left and bottom right left images in pointBase More...
 
void cumdump (int imgW, int imgH)
 image stitching using SIFT More...
 
void patternMatchTry (int imgW, int imgH)
 stitches images using pattern matching More...
 
void onlineStitch (int imgW, int imgH, string path)
 online image stitching using pattern matching More...
 
void onlineStitchSIFT (int imgW, int imgH, string path)
 online image stitching using SIFT More...
 

Public Attributes

vector< Point2d > points
 
vector< Point2d > doneVector
 
vector< Point2d > toDoVector
 
std::map< Point2d, string, ComparePointspathMap
 
double imgWidthDeg
 
double imgHeightDeg
 

Detailed Description

class implemented as solution for the thesis providing stitching and stitching features

Member Function Documentation

◆ cumdump()

void PointBase::cumdump ( int  imgW,
int  imgH 
)
inline

image stitching using SIFT

saves the source image to the current directory

Parameters
imgWsource image width
imgHsource image height

◆ dtBlend()

Mat PointBase::dtBlend ( Mat  roi,
Mat  transformedRoi,
bool  showImg = false 
)
inline

blends using distance transform

Parameters
roioriginal roi with 1 or more stitched images
transformedRoiroi-sized! image with the new image in the appropriate location
showImgbool, switch to enable showing of the new roi
Returns
Mat - the blended image

◆ getAdjacents()

vector<Point2d> PointBase::getAdjacents ( Point2d  inputPoint)
inline

DESTRUCTIVE!! - removes found adj. points from points vector, adds them to the toBeDone vector.

Searches for adjacent points to a given point

Returns either empty vector, or a vector with the found adjacent points

Parameters
inputPoint- opencv Point2d of the searched point
Returns
vector of <Point2d> - points of images which are adjacent to the inputPoint

◆ getEdgeValues()

std::vector<double> PointBase::getEdgeValues ( )
inline

gets the values of the top right, left and bottom right left images in pointBase

Returns
vector, where the values are [minX,maxX,minY,maxY]

◆ getPath()

string PointBase::getPath ( double  x,
double  y 
)
inline

returns the path of a point specified by x and y values

Parameters
x- x-value of the point
y- y-value of the point
Returns
string - path of the point

◆ load()

int PointBase::load ( string  path)
inline

load the points from a database - necessary for the offline algorithm

loaded points in pointbase are sorted according to X value

Parameters
path- location where images and their jsons are stored in string format
Returns
int - 0 if success, -1 if no points were loaded

◆ onlineStitch()

void PointBase::onlineStitch ( int  imgW,
int  imgH,
string  path 
)
inline

online image stitching using pattern matching

saves the result image to the current directory

do not load() any database previous to using this function

Parameters
imgWsource image width
imgHsource image height
pathpath to the images

◆ onlineStitchSIFT()

void PointBase::onlineStitchSIFT ( int  imgW,
int  imgH,
string  path 
)
inline

online image stitching using SIFT

saves the result image to the current directory

do not load() any database previous to using this function

Parameters
imgWsource image width
imgHsource image height
pathpath to the images

◆ patternMatchTry()

void PointBase::patternMatchTry ( int  imgW,
int  imgH 
)
inline

stitches images using pattern matching

saves the source image to the current directory

Parameters
imgWwidth of the source images
imgHheight of the source images

◆ printPoints()

void PointBase::printPoints ( int  which = 0)
inline

prints the points from the database into the terminal

Parameters
which- if which is 0, the points vector is printed; 1 prints the complete contents of pathMap

◆ pyramidBlend()

Mat PointBase::pyramidBlend ( Mat  roi,
Mat  transformedRoi,
bool  showImg = false 
)
inline

blends using image pyramids transform

Parameters
roioriginal roi with 1 or more stitched images
transformedRoiroi-sized! image with the new image in the appropriate location
showImgbool, switch to enable showing of the new roi
Returns
Mat - the blended image

◆ rotate()

Mat PointBase::rotate ( Mat  src,
double  angle 
)
inline

rotation function https://stackoverflow.com/questions/22041699/rotate-an-image-without-cropping-in-opencv-in-c

Parameters
src- input image
angle- angle in degrees
Returns
rotated image

◆ showPointImg()

void PointBase::showPointImg ( )
inline

shows the location of loaded points on an images

useful for debugging

images have to be loaded using the load() function

◆ stitchImgs()

void PointBase::stitchImgs ( )
inline

stitches images using opencv pipeline

points have to be loaded in the pointBase first

saves the result image in current directory

Member Data Documentation

◆ doneVector

vector<Point2d> PointBase::doneVector

points that have been successfully searched for adjacencies

◆ imgHeightDeg

double PointBase::imgHeightDeg

image height in sensor format

◆ imgWidthDeg

double PointBase::imgWidthDeg

image width in degress taken from file

◆ pathMap

std::map<Point2d, string, ComparePoints> PointBase::pathMap

map for file paths - get the path of a file via pathMap[Point2d(x,y)]

◆ points

vector<Point2d> PointBase::points

all points - points are being removed as adjacencies are found

◆ toDoVector

vector<Point2d> PointBase::toDoVector

points yet to be searched for adjacent points


The documentation for this class was generated from the following file: