-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add new algorithm to the structured light module #2656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.x
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution!
Please take a look on comments below.
@@ -0,0 +1,8 @@ | |||
# Default ignored files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.idea
Please remove IDE related files from the Git.
Configure "global .gitignore" for handling that in the future.
Rebase / squash all commits into one after that (to cleanup Git history).
@@ -1,2 +1,3 @@ | |||
set(the_description "Structured Light API") | |||
ocv_define_module(structured_light opencv_core opencv_imgproc opencv_calib3d opencv_phase_unwrapping OPTIONAL opencv_viz WRAP python java objc) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary changes from PR
@@ -0,0 +1,55 @@ | |||
<?xml version="1.0"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modules/structured_light/images
Perhaps should go into modules/structured_light/samples/data instead.
|
||
|
||
#ifndef OPENCV_structured_light_HPP | ||
#define OPENCV_structured_light_HPP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
capital letters
add _SLMONO_
|
||
namespace cv{ | ||
namespace structured_light{ | ||
class CV_EXPORTS StructuredLightMono : public virtual Algorithm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
virtual
Do we really need this here?
namespace structured_light{ | ||
|
||
//compute atan2 for object and reference images | ||
void computeAtanDiff(InputOutputArrayOfArrays src, OutputArray dst); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid indentation in namespaces.
|
||
int calibrate( int argc, char **argv ) | ||
{ | ||
VideoCapture cap(CAP_PVAPI); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PVAPI
Can other backends work here?
void StructuredLightMono::removeShadows(InputOutputArrayOfArrays refs, InputOutputArrayOfArrays imgs) | ||
{ | ||
vector<Mat>& refs_ = *(vector<Mat>*)refs.getObj(); | ||
vector<Mat>& imgs_ = *(vector<Mat>*)imgs.getObj(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is not safe.
Checks should be added.
@@ -0,0 +1,242 @@ | |||
#include <opencv2/structured_light/slmono.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use short OpenCV license header (in all new .hpp/.cpp files except samples):
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
https://github.com/opencv/opencv/wiki/Coding_Style_Guide#file-structure
@@ -0,0 +1,252 @@ | |||
#include "opencv2/structured_light/slmono_utils.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include "precomp.hpp" first in all src/*.cpp
files.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.