This commit is contained in:
@@ -91,13 +91,13 @@ public class CameraApp extends JFrame {
|
||||
controlsPanel.add(new JLabel("Camera:"), gbc);
|
||||
gbc.gridx = 1;
|
||||
cameraSelect = new JComboBox<>();
|
||||
cameraSelect.addActionListener(_ -> changeCamera());
|
||||
cameraSelect.addActionListener(e -> changeCamera()); // Fix for Issue 1
|
||||
controlsPanel.add(cameraSelect, gbc);
|
||||
|
||||
// Detection checkbox
|
||||
gbc.gridx = 0; gbc.gridy = 1; gbc.gridwidth = 2;
|
||||
detectionCheckbox = new JCheckBox("Enable Object Detection", true);
|
||||
detectionCheckbox.addActionListener(_ -> toggleDetection());
|
||||
detectionCheckbox.addActionListener(e -> toggleDetection()); // Fix for Issue 1
|
||||
controlsPanel.add(detectionCheckbox, gbc);
|
||||
|
||||
// Buttons
|
||||
@@ -695,7 +695,7 @@ class DetectionThread extends SwingWorker<Mat, Void> {
|
||||
int offset = i * out.cols();
|
||||
float confidence = data[offset + 4];
|
||||
|
||||
if (confidence > 0.5) {
|
||||
if (confidence > 0.2) {
|
||||
// Find class with maximum score
|
||||
int classId = 0;
|
||||
float maxScore = 0;
|
||||
|
||||
Reference in New Issue
Block a user