diff --git a/openbr/core/bee.cpp b/openbr/core/bee.cpp index a513b74..1792fbd 100644 --- a/openbr/core/bee.cpp +++ b/openbr/core/bee.cpp @@ -107,6 +107,8 @@ void BEE::writeSigset(const QString &sigset, const br::FileList &files, bool ign template Mat readMatrix(const br::File &matrix, QString *targetSigset = NULL, QString *querySigset = NULL) { + qDebug() << matrix; + // Special case matrix construction if (matrix == "Identity") { int rows = matrix.get("rows", -1); @@ -161,6 +163,9 @@ Mat readMatrix(const br::File &matrix, QString *targetSigset = NULL, QString *qu int rows = words[1].toInt(); int cols = words[2].toInt(); + qDebug() << rows; + qDebug() << cols; + // Get matrix data qint64 bytesExpected = (qint64)rows*(qint64)cols*(qint64)sizeof(T); Mat m(rows, cols, OpenCVType::make()); diff --git a/openbr/core/plot.cpp b/openbr/core/plot.cpp index d1f4d27..aaf7a15 100644 --- a/openbr/core/plot.cpp +++ b/openbr/core/plot.cpp @@ -499,6 +499,7 @@ bool Plot(const QStringList &files, const br::File &destination, bool show) (p.minor.size > 1 ? QString(" + scale_linetype_discrete(\"%1\")").arg(p.minor.header) : QString()) + QString(" + scale_x_log10(labels=percent) + scale_y_log10(labels=percent) + annotation_logticks()\n\n"))); + p.file.write(qPrintable(QString("qplot(X, data=SD, geom=\"histogram\", fill=Y, position=\"identity\", alpha=I(1/2)") + QString(", xlab=\"Score%1\"").arg((p.flip ? p.major.size : p.minor.size) > 1 ? " / " + (p.flip ? p.major.header : p.minor.header) : QString()) + QString(", ylab=\"Frequency%1\"").arg((p.flip ? p.minor.size : p.major.size) > 1 ? " / " + (p.flip ? p.minor.header : p.major.header) : QString()) + @@ -507,11 +508,11 @@ bool Plot(const QStringList &files, const br::File &destination, bool show) QString(" + theme(aspect.ratio=1)\n\n"))); p.file.write(qPrintable(QString("ggplot(CMC, aes(x=X, y=Y%1%2)) + xlab(\"Rank\") + ylab(\"Retrieval Rate\")").arg(p.major.size > 1 ? QString(" ,colour=factor(%1)").arg(p.major.header) : QString(), p.minor.size > 1 ? QString(", linetype=factor(%1)").arg(p.minor.header) : QString()) + - ((p.major.smooth || p.minor.smooth) ? (minimalist ? " + stat_summary(geom=\"line\", lwd=3, fun.y=mean)" : " + stat_summary(geom=\"line\", fun.y=min, aes(linetype=\"Min/Max\")) + stat_summary(geom=\"line\", fun.y=max, aes(linetype=\"Min/Max\")) + stat_summary(geom=\"line\", fun.y=mean, aes(linetype=\"Mean\")) + scale_linetype_manual(\"Legend\", values=c(\"Mean\"=1, \"Min/Max\"=2))") : " + geom_line()") + + ((p.major.smooth || p.minor.smooth) ? (minimalist ? " + stat_summary(geom=\"line\", fun.y=mean)" : " + stat_summary(geom=\"line\", fun.y=min, aes(linetype=\"Min/Max\")) + stat_summary(geom=\"line\", fun.y=max, aes(linetype=\"Min/Max\")) + stat_summary(geom=\"line\", fun.y=mean, aes(linetype=\"Mean\")) + scale_linetype_manual(\"Legend\", values=c(\"Mean\"=1, \"Min/Max\"=2))") : " + geom_line()") + (minimalist ? "" : " + scale_x_log10(labels=c(1,5,10,50,100), breaks=c(1,5,10,50,100)) + annotation_logticks(sides=\"b\")") + (p.major.size > 1 ? getScale("colour", p.major.header, p.major.size) : QString()) + (p.minor.size > 1 ? QString(" + scale_linetype_discrete(\"%1\")").arg(p.minor.header) : QString()) + - QString(" + theme_blank() + scale_y_continuous(labels=percent)\n\n"))); + QString(" + theme_minimal() + scale_y_continuous(labels=percent)\n\n"))); p.file.write(qPrintable(QString("qplot(factor(%1)%2, data=BC, %3").arg(p.major.smooth ? (p.minor.header.isEmpty() ? "Algorithm" : p.minor.header) : p.major.header, (p.major.smooth || p.minor.smooth) ? ", Y" : "", (p.major.smooth || p.minor.smooth) ? "geom=\"boxplot\"" : "geom=\"bar\", position=\"dodge\", weight=Y") + (p.major.size > 1 ? QString(", fill=factor(%1)").arg(p.major.header) : QString()) + diff --git a/openbr/gui/imageviewer.cpp b/openbr/gui/imageviewer.cpp index 5512c78..bd12452 100644 --- a/openbr/gui/imageviewer.cpp +++ b/openbr/gui/imageviewer.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include "imageviewer.h" @@ -36,6 +37,7 @@ void br::ImageViewer::setDefaultText(const QString &text) void br::ImageViewer::setImage(const QString &file, bool async) { + QMutexLocker locker(&mutex); if(file.isNull()) src = QImage(); // Gets rid of runtime FileEngine::open warning else src = QImage(file); updatePixmap(async); @@ -43,12 +45,14 @@ void br::ImageViewer::setImage(const QString &file, bool async) void br::ImageViewer::setImage(const QImage &image, bool async) { + QMutexLocker locker(&mutex); src = image.copy(); updatePixmap(async); } void br::ImageViewer::setImage(const QPixmap &pixmap, bool async) { + QMutexLocker locker(&mutex); src = pixmap.toImage(); updatePixmap(async); } diff --git a/share/openbr/openbr.svg b/share/openbr/openbr.svg index a8c5a6e..a898d90 100644 --- a/share/openbr/openbr.svg +++ b/share/openbr/openbr.svg @@ -25,14 +25,14 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.1572757" - inkscape:cx="285.7618" - inkscape:cy="191.07932" + inkscape:cx="391.0146" + inkscape:cy="232.5551" inkscape:document-units="px" - inkscape:current-layer="layer1" + inkscape:current-layer="text3808" showgrid="false" - inkscape:window-width="1389" - inkscape:window-height="856" - inkscape:window-x="51" + inkscape:window-width="1222" + inkscape:window-height="756" + inkscape:window-x="58" inkscape:window-y="0" inkscape:window-maximized="1" />