You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
namespaceOPT {
const double VSCALE = 1000.0;
enum Method {fpcorners, strongborder, regular, automatic};
enum PageType {detect, letter};
enum Par {ANGLETOL, DISTTOL, POLYTOL, ASPECTRATIO, SIZERATIO, RATIOTOL, ETOL1, ETOL2, ESIZE, METHOD,
CBLOCK, CSIZE, K, CTHRESH};
}
usingnamespace OPT;
void Capture::setValue(Par param, int value) {
auto toDouble = [](int v) {return ((double)v)/VSCALE;};
switch(param) {
case ANGLETOL: angleTol = value; break;
case DISTTOL: distTol = value; break;
case POLYTOL: polyTol = value; break;
case ASPECTRATIO: setAspectRatio((PageType)value); break;
case SIZERATIO: sizeRatio = toDouble(value); break;
case RATIOTOL: ratioTol = toDouble(value); break;
case ETOL1: etol1 = value; break;
case ETOL2: etol2 = value; break;
case ESIZE: eSize = value; break;
case CBLOCK: cBlock = value; break;
case CSIZE: cSize = value; break;
case K: k = value; break;
case CTHRESH: cThresh = value; break;
case METHOD: sel = (Method)value; break;
default: break;
}
}
When this is run, all the other sliders update their selected values, but ETOL1, ETOL2, and ESIZE appear not to. This may be because the param does not select the proper case statement due to pointer issues in the struct.
The text was updated successfully, but these errors were encountered:
main.cpp
capture.cpp
When this is run, all the other sliders update their selected values, but ETOL1, ETOL2, and ESIZE appear not to. This may be because the param does not select the proper case statement due to pointer issues in the struct.
The text was updated successfully, but these errors were encountered: