21 #include "drwnVision.h"
23 #include "drwnPatchMatch.h"
29 namespace drwnPatchMatchUtils {
32 inline cv::Point transformPixel(
const cv::Point& srcPixel,
33 const cv::Size& srcSize,
const cv::Size& dstSize)
35 return cv::Point(srcPixel.x * dstSize.width / srcSize.width,
36 srcPixel.y * dstSize.height / dstSize.height);
40 inline cv::Rect transformRect(
const cv::Rect& srcRect,
41 const cv::Size& srcSize,
const cv::Size& dstSize)
45 dstRect.x = srcRect.x * dstSize.width / srcSize.width;
46 dstRect.y = srcRect.y * dstSize.height / srcSize.height;
47 dstRect.width = srcRect.width * dstSize.width / srcSize.width;
48 dstRect.height = srcRect.height * dstSize.height / srcSize.height;
54 void loadLabels(
const set<string>& baseNames, map<string, MatrixXi>& labels);
57 vector<cv::Point> sortPixelsByVariance(
const cv::Mat& img,
const cv::Size& patchSize);
63 double overlap(
const drwnPatchMatchEdgeList& edgesA,
64 const drwnPatchMatchEdgeList& edgesB);
Represents a node in the drwnPatchMatchGraph.
Definition: drwnPatchMatch.h:66
Each image maintains a W-by-H-by-K array of match records referencing the (approximate) best K matche...
Definition: drwnPatchMatch.h:323