commit 27/2025
Tambah Crop Setting
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user