Skip to content

Commit

Permalink
Merge pull request openpnp#736 from cri-s/patch-1
Browse files Browse the repository at this point in the history
reintroduce multiple uplooking camera support
  • Loading branch information
vonnieda authored Jun 15, 2018
2 parents b95a516 + 57d3ca5 commit 5131a74
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ private static PartAlignmentOffset findOffsetsPreRotate(Part part, BoardLocation
try (CvPipeline pipeline = partSettings.getPipeline()) {

RotatedRect rect = processPipelineAndGetResult(pipeline, camera, part, nozzle);
camera=(Camera)pipeline.getProperty("camera");

angle = angleNorm(angleNorm(angle)
+ angleNorm((rect.size.width < rect.size.height) ? 90 + rect.angle : rect.angle));
Expand All @@ -115,7 +116,7 @@ private static PartAlignmentOffset findOffsetsPreRotate(Part part, BoardLocation

rect = processPipelineAndGetResult(pipeline, camera, part, nozzle);

Logger.debug("Result rect ( center: {} size: {} angle: {} )", rect.center, rect.size, rect.angle);
Logger.debug("Result rect {}", rect);
Location offsets = VisionUtils.getPixelCenterOffsets(camera, rect.center.x, rect.center.y)
.derive(null, null, null, Double.NaN);

Expand All @@ -140,6 +141,7 @@ private static PartAlignmentOffset findOffsetsPostRotate(Part part, BoardLocatio

try (CvPipeline pipeline = partSettings.getPipeline()) {
RotatedRect rect = processPipelineAndGetResult(pipeline, camera, part, nozzle);
camera=(Camera)pipeline.getProperty("camera");

Logger.debug("Result rect {}", rect);

Expand Down

0 comments on commit 5131a74

Please sign in to comment.