Skip to content

Commit

Permalink
some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
levyishai committed Mar 19, 2024
1 parent 3ffbac3 commit a09ce92
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ protected CVPipelineResult process(Frame input_frame, RKNNPipelineSettings setti

boolean isIn(List<NeuralNetworkPipeResult> list, NeuralNetworkPipeResult target) {
for (var item : list)
if (item.box.equals(target.box)
if (item.bbox.equals(target.bbox)
&& item.classIdx == target.classIdx
&& item.confidence == target.confidence) return true;
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,48 +238,6 @@ private void updatePipelineFromRequested() {
"fullsettings", ConfigManager.getInstance().getConfig().toHashMap()));
}

/**
* Recreate the current user pipeline with the current pipeline index. Useful to force a
* recreation after changing pipeline type
*/
private void recreateUserPipeline() {
// Cleanup potential old native resources before swapping over from a user pipeline
if (currentUserPipeline != null && !(currentPipelineIndex < 0)) {
currentUserPipeline.release();
}

var desiredPipelineSettings = userPipelineSettings.get(currentPipelineIndex);
switch (desiredPipelineSettings.pipelineType) {
case Reflective:
logger.debug("Creating Reflective pipeline");
currentUserPipeline =
new ReflectivePipeline((ReflectivePipelineSettings) desiredPipelineSettings);
break;
case ColoredShape:
logger.debug("Creating ColoredShape pipeline");
currentUserPipeline =
new ColoredShapePipeline((ColoredShapePipelineSettings) desiredPipelineSettings);
break;
case AprilTag:
logger.debug("Creating AprilTag pipeline");
currentUserPipeline =
new AprilTagPipeline((AprilTagPipelineSettings) desiredPipelineSettings);
break;

case Aruco:
logger.debug("Creating Aruco Pipeline");
currentUserPipeline = new ArucoPipeline((ArucoPipelineSettings) desiredPipelineSettings);
break;
case ObjectDetection:
logger.debug("Creating ObjectDetection Pipeline");
currentUserPipeline =
new ObjectDetectionPipeline((ObjectDetectionPipelineSettings) desiredPipelineSettings);
default:
// Can be calib3d or drivermode, both of which are special cases
break;
}
}

/**
* Enters or exits calibration mode based on the parameter. <br>
* <br>
Expand Down

0 comments on commit a09ce92

Please sign in to comment.