解决EDCircle内存越界问题,背景图片加载问题

jizhi
qushuai777 5 years ago
parent 35a98b4ea9
commit fbf45f9ffe

@ -16,7 +16,7 @@
#define CANDIDATE_CIRCLE_RATIO1 0.25 // 25% -- If only 25% of the circle is detected, it may be a candidate for validation #define CANDIDATE_CIRCLE_RATIO1 0.25 // 25% -- If only 25% of the circle is detected, it may be a candidate for validation
#define CANDIDATE_CIRCLE_RATIO2 0.33 // 33% -- If only 33% of the circle is detected, it may be a candidate for validation #define CANDIDATE_CIRCLE_RATIO2 0.33 // 33% -- If only 33% of the circle is detected, it may be a candidate for validation
#define HALF_CIRCLE_RATIO 0.50 // 50% -- If 50% of a circle is detected at any point during joins, we immediately make it a candidate #define HALF_CIRCLE_RATIO 0.50 // 50% -- If 50% of a circle is detected at any point during joins, we immediately make it a candidate
#define FULL_CIRCLE_RATIO 0.67 // 67% -- If 67% of the circle is detected, we assume that it is fully covered #define FULL_CIRCLE_RATIO 0.87 // 67% -- If 67% of the circle is detected, we assume that it is fully covered
// Ellipse thresholds // Ellipse thresholds
#define CANDIDATE_ELLIPSE_RATIO 0.50 // 50% -- If 50% of the ellipse is detected, it may be candidate for validation #define CANDIDATE_ELLIPSE_RATIO 0.50 // 50% -- If 50% of the ellipse is detected, it may be candidate for validation
@ -217,7 +217,8 @@ private:
int *segmentStartLines; int *segmentStartLines;
BufferManager *bm; BufferManager *bm;
Info *info; //Info *info;
std::vector<Info> info;
NFALUT *nfa; NFALUT *nfa;
void GenerateCandidateCircles(); void GenerateCandidateCircles();

@ -852,7 +852,7 @@ Q_SLOT void QSystemSettingDlg::onChangeBG()
QStringList backgroundFile = fileDialog.selectedFiles(); QStringList backgroundFile = fileDialog.selectedFiles();
if (backgroundFile.size() > 0) if (backgroundFile.size() > 0)
{ {
QString DstPath = /*m_pCtrl->appRoot() +*/ "\\user\\background.png"; QString DstPath = QApplication::applicationDirPath()+ "\\user\\background.png";
QString sourcePath = backgroundFile.at(0); QString sourcePath = backgroundFile.at(0);
DstPath.replace("\\", "/"); DstPath.replace("\\", "/");
if (sourcePath == DstPath) { if (sourcePath == DstPath) {

Loading…
Cancel
Save