feat(image_projection_based_fusion): add cache for camera projection #9635
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Change in average Code Health of affected files: +0.41 (8.05 -> 8.46)
- Declining Code Health: 5 findings(s) 🚩
- Improving Code Health: 9 findings(s) ✅
Details
🚩 Declining Code Health (highest to lowest):
- Code Duplication camera_projection.cpp
- Overall Code Complexity camera_projection.cpp
- Complex Conditional camera_projection.cpp: CameraProjection::calcRectifiedImageProjectedPoint
- Complex Conditional camera_projection.cpp: CameraProjection::calcRawImageProjectedPoint
- Complex Method camera_projection.cpp: CameraProjection::CameraProjection
✅ Improving Code Health:
- Complex Method node.cpp: RoiClusterFusionNode::fuseOnSingleImage
- Complex Method node.cpp: RoiDetectedObjectFusionNode::generateDetectedObjectRoIs
- Complex Conditional node.cpp: RoiDetectedObjectFusionNode::generateDetectedObjectRoIs
- Brain Method node.cpp: RoiClusterFusionNode::fuseOnSingleImage
- Complex Conditional node.cpp: RoiClusterFusionNode::fuseOnSingleImage
- Excess Number of Function Arguments node.cpp: RoiClusterFusionNode::fuseOnSingleImage
- Brain Method node.cpp: RoiDetectedObjectFusionNode::generateDetectedObjectRoIs
- Excess Number of Function Arguments node.cpp: RoiDetectedObjectFusionNode::generateDetectedObjectRoIs
- Overall Code Complexity utils.cpp
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Code Duplication
The module contains 2 functions with similar structure: CameraProjection::calcRawImageProjectedPoint,CameraProjection::calcRectifiedImageProjectedPoint. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
CameraProjection::CameraProjection has a cyclomatic complexity of 12, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
CameraProjection::calcRectifiedImageProjectedPoint has 1 complex conditionals with 3 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
CameraProjection::calcRawImageProjectedPoint has 1 complex conditionals with 3 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 4.50 across 10 functions. The mean complexity threshold is 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Brain Method
RoiClusterFusionNode::fuseOnSingleImage is no longer a brain method
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Complex Method
RoiClusterFusionNode::fuseOnSingleImage decreases in cyclomatic complexity from 41 to 37, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Conditional
RoiClusterFusionNode::fuseOnSingleImage no longer has a complex conditional
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Excess Number of Function Arguments
RoiClusterFusionNode::fuseOnSingleImage is no longer above the threshold for number of arguments
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Brain Method
RoiDetectedObjectFusionNode::generateDetectedObjectRoIs is no longer a brain method
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Complex Method
RoiDetectedObjectFusionNode::generateDetectedObjectRoIs decreases in cyclomatic complexity from 21 to 18, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Conditional
RoiDetectedObjectFusionNode::generateDetectedObjectRoIs no longer has a complex conditional. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Excess Number of Function Arguments
RoiDetectedObjectFusionNode::generateDetectedObjectRoIs is no longer above the threshold for number of arguments
Check notice on line 1 in perception/autoware_image_projection_based_fusion/src/utils/utils.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Overall Code Complexity
The mean cyclomatic complexity in this module is no longer above the threshold