commit 27/2025

Tambah Crop Setting
This commit is contained in:
2025-05-27 14:47:52 +07:00
parent 957d642f5d
commit 0728ae3ca2
4 changed files with 11 additions and 14 deletions

View File

@@ -193,12 +193,12 @@ public class Detectors {
if (detector!=null && !detector.empty()){
if (graymat!=null && graymat.channels()==1 && !graymat.empty()){
if (minSize!=null && maxSize!=null){
if (minSize.width()<= maxSize.width() && minSize.height() <= maxSize.height()){
if (minSize.width()< maxSize.width() && minSize.height() < maxSize.height()){
if (graymat.cols()> minSize.width() && graymat.rows() > minSize.height()) {
try {
RectVector detected = new RectVector();
// try defaulting minSize and maxSize
detector.detectMultiScale(graymat, detected, scaleFactor, minNeighbors, flags, minSize, maxSize);
detector.detectMultiScale(graymat, detected, scaleFactor, minNeighbors, flags, minSize, new Size());
return detected;
} catch (Exception e) {