21#define FOLD2DINDEX(i,j,jmax) ((i)*(jmax)+j)
28 m_isGnuplot (isGnuplot)
33void PointMatchAlgorithm::allocateMemory(
double**
array,
47void PointMatchAlgorithm::assembleLocalMaxima(
double*
convolution,
57 for (
int i = 0;
i < width;
i++) {
125 conjugateMatrix(width,
130 multiplyMatrices(width,
152 for (
int i = 0;
i < width;
i++) {
168void PointMatchAlgorithm::conjugateMatrix(
int width,
176 for (
int x = 0; x < width; x++) {
177 for (
int y = 0; y <
height; y++) {
185void PointMatchAlgorithm::dumpToGnuplot (
double*
convolution,
195 if (
file.open (QIODevice::WriteOnly | QIODevice::Text)) {
199 str <<
"# Suggested gnuplot commands:" <<
endl;
200 str <<
"# set hidden3d" <<
endl;
204 str <<
"# I J Convolution" <<
endl;
205 for (
int i = 0;
i < width;
i++) {
276 "convolution.gnuplot");
291 PointMatchList::iterator
itr;
303 releaseImageArray(image);
305 releaseImageArray(
sample);
322 allocateMemory(image,
332 removePixelsNearExistingPoints(*image,
384void PointMatchAlgorithm::multiplyMatrices(
int width,
392 for (
int x = 0; x < width; x++) {
393 for (
int y = 0; y <
height; y++) {
397 out [index] [0] =
in1 [index] [0] *
in2 [index] [0] -
in1 [index] [1] *
in2 [index] [1];
398 out [index] [1] =
in1 [index] [0] *
in2 [index] [1] +
in1 [index] [1] *
in2 [index] [0];
456 for (
int x = 0; x < width; x++) {
457 for (
int y = 0; y <
height; y++) {
509 for (x = 0; x < width; x++) {
510 for (y = 0; y <
height; y++) {
549void PointMatchAlgorithm::releaseImageArray(
double*
array)
565void PointMatchAlgorithm::removePixelsNearExistingPoints(
double* image,
const int INNER_RADIUS_MIN
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT.
#define ENGAUGE_CHECK_PTR(ptr)
Drop in replacement for Q_CHECK_PTR.
log4cpp::Category * mainCat
#define FOLD2DINDEX(i, j, jmax)
QList< PointMatchTriplet > PointMatchList
Class for filtering image to remove unimportant information.
bool pixelFilteredIsOn(const QImage &image, int x, int y) const
Return true if specified filtered pixel is on.
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
double maxPointSize() const
Get method for max point size.
QList< QPoint > findPoints(const QList< PointMatchPixel > &samplePointPixels, const QImage &imageProcessed, const DocumentModelPointMatch &modelPointMatch, const Points &pointsExisting)
Find points that match the specified sample point pixels. They are sorted by best-to-worst match.
PointMatchAlgorithm(bool isGnuplot)
Single constructor.
Representation of one matched point as produced from the point match algorithm.
#define LOG4CPP_INFO_S(logger)
const QString GNUPLOT_FILE_MESSAGE