Closed ymd-stella closed 2 years ago
The natural order is from feature point extraction to stereo matching to grid assignment of feature points. The suspects are as follows
Overall, the similarities are negligible.
It is related to
Overall, the order of processing is natural, and no similarities in expression were found.
There is a very unnatural similarity between the two. It is natural to simply implement extract_orb_left and extract_orb_right or use lambda expression. It needs to be removed.
It is related to
Overall, the order of processing was natural, and no similarities in expression were found.
Considering the computational efficiency, the processing order looks natural. There is no similarity other than the order of processing.
It is unnatural to return without doing anything when bowvec is not empty. However, they are similar. It needs to be removed.
It's similar order of processing. However, the order of processing is natural. There are ways to avoid overwriting the result in mat, but this is the natural implementation from the perspective of memory efficiency.
No similarities in expression were found. (Off topic, but it is more natural to use Point2f instead of KeyPoint.)
matcher::stereo::compute calls
The same stereo matching algorithm is used. There are similarities, but I think it is due to the fact that they share the same algorithm.
It is similar, but very simple and there is no other way to express it.
It is similar, but very simple and there is no other way to express it.
The similarities are negligible. It is a bit unnatural to generate a keyframe by copying the member variables of a frame. With some effort, it may be possible to make the keyframe have a reference to the frame.
It is unnatural to return without doing anything when bowvec and bow_featvec is not empty. However, they are similar. It needs to be removed.
There are similarities, but very simple and there is no other way to express it. Cw (Stereo middel point) exists only in ORB_SLAM2.
There are similarities, but very simple and there is no other way to express it.
The suspects are as follows
Overall, the similarities are negligible. However, I think it is natural to keep the mutex lock on during add_connection.
I'm curious about the similarity of orderedcovisibilities and orderedweights. It is natural to use std::vector<std::pair<unsigned int, std::weak_ptr<keyframe>>>> ordered_weights_and_covisibilities_
. However, there may be a rationale for execution efficiency.
There are similarities, but very simple and there is no other way to express it. (Off topic, in ORB_SLAM2, EraseMapPointMatch and ReplaceMapPointMatch are not mutex locked. Is this a bug?)
There are similarities, but very simple and there is no other way to express it.
There are similarities, but I think it is due to the fact that they share the same algorithm.
There are similarities, but very simple and there is no other way to express it.
The similarities are negligible.
The order of processing is natural, and no similarities in expression were found.
The only similarity is in the last conditional expression, and there is no other way to express it.
There are similarities, but very simple and there is no other way to express it.
There are similarities, but very simple and there is no other way to express it.
The similarities are negligible.
In SetWorldPos, mGlobalMutex is used. This is locked during pose optimization, which is not present in OpenVSLAM.
GetMinDistanceInvariance and get_min_valid_distance have different magic numbers, but the basis for both is unknown. The same is true for GetMaxDistanceInvariance and get_max_valid_distance.
There are similarities, but very simple and there is no other way to express it.
The similarities are negligible.
There is a process to update the reference keyframe with the first observed keyframe. We could use any other keyframe in observations_
, but I think the current process is the simplest. There was a comment that matched EraseObservation and erase_observation. There are similarities, but very simple and there is almost no other way to express it. It is better to rewrite the comment from scratch.
There are similarities, but very simple and there is no other way to express it. The order of processing is natural.
ComputeDistinctiveDescriptors returns when vDescriptors is empty, while OpenVSLAM does not. The order of processing is natural. There are similarities, but I think it is due to the fact that they share the same algorithm.
There are similarities, but very simple and there is no other way to express it. This naming is a bit unnatural for the description
It is unnatural to use overloading just to get log_scalefactor and num_scalelevels. It needs to be removed.
The process using max_keyfrmid is unnatural, and it is better to remove the process using max_keyfrmid.
It is similar, but very simple and there is no other way to express it.
No similar function was found.
It is similar, but very simple and there is no other way to express it.
The process using max_keyfrmid is unnatural, and it is better to remove the process using max_keyfrmid.
The process of assigning nullptr is unnatural. It needs to be removed. Other than that, it is very simple and there is no other way to describe it.
It is similar, but very simple and there is no other way to express it.
The similarities are negligible.
There are similarities, but I think it is due to the fact that they share the same algorithm.
Overall, the similarities in code are negligible. However, I am concerned about the similarity in screen design. I am not sure if that is covered by GPLv3. The colors are just one of the customizable setting values, so I don't think there is a problem. It might be better to determine the default setting values specific to OpenVSLAM. The content displayed at the bottom of the frame is not very similar. As for the drawing of the overlay, it is too similar and would be better to redesign it. For OpenVSLAM, it is natural to separate the statistics and status from frame_publisher and create another publisher.
It is needed to change the default color scheme and remove the overlay text.
The similarities are negligible. The necessity of displaying the copyright is unclear. It may be enough to provide a function like show_copyright_notice. For example, it will show the notice when the --lisence
command line option is given.
The similarities are negligible, except for the handling of resets. Reset is explained in detail in the next section.
Overall, the process for reset has some very unnatural similarities, and the functions related to request_reset need to be removed.
I think it is better to use std::future/std::promise
to wait for the process to finish.
I think it is better to use std::future/std::promise
to wait for the process to finish. Overall, there is unnatural similarities in the process of sending a request and waiting for it to finish. These need to be removed.
The similarities are negligible.
There is no similar getters. map_publisher provides landmarks, but in a completely different expression.
There are similarities, but it is due to the fact that they share the same algorithm.
There are similarities, but it is due to the fact that they share the same algorithm.
There are a bit of similarities, but it is due to the fact that they share the same algorithm. In OpenVSLAM, there is a link to https://www.uio.no/studier/emner/matnat/its/UNIK4690/v16/forelesninger/lecture_4_3-estimating-homographies-from-feature-correspondences.pdf.
There are a bit of similarities, but it is due to the fact that they share the same algorithm.
There are a bit of similarities, but it is due to the fact that they share the same algorithm.
There are a bit of similarities, but it is due to the fact that they share the same algorithm. In solve::homography_solver::decompose, there was a reference to "Motion and structure from motion in a piecewise planar environment (Faugeras et al. in IJPRAI 1988)". In solve::essential_solver::decompose, there was a link to https://en.wikipedia.org/wiki/Essential_matrix#Determining_R_and_t_from_E.
In OpenVSLAM, bearings are used instead of keypoints. There are a bit of similarities, but it is due to the fact that they share the same algorithm.
There are a bit of similarities, but it is due to the fact that they share the same algorithm.
The similarities are negligible.
It is similar, but very simple and there is no other way to express it.
Related functions are as follows:
There is a slight similarity. The frame is initialized in a different way for each camera configuration and passed to the common process. The similarity is due to the efficiency of the implementation. In monocular, the use of a feature point extractor for initialization is also similar, due to the fact that it is better to use more feature points to get better/stable results. Overall, no problematic similarities were found.
There are similarities, but I think it is due to the fact that they share the same algorithm.
It is similar, but very simple and there is no other way to express it.
The first few lines are similar, but the similarity after that is negligible. For example, only ORB-SLAM2 performs VO. It also has a conditional branch depending on whether mapping is enabled or disabled, and the fallback from TrackWithMotionModel to TrackReferenceKeyFrame is different. On the other hand, OpenVSLAM does almost the same thing regardless of whether mapping is enabled or disabled. (Off topic, in OpenVSLAM, I don't think it is necessary to update_local_map after successful initialization.)
There are similarities, but very simple and there is no other way to express it. We will consider is_observable_intracking and identifier_in_local_lmsearch in detail next(search_local_landmarks).
The following variables are temporary variables, but they are declared as member variables. https://github.com/OpenVSLAM-Community/openvslam/blob/aa1f04810b0dc5ba3f974d723df4f965492e3585/src/openvslam/data/landmark.h#L114-L120 https://github.com/OpenVSLAM-Community/openvslam/blob/aa1f04810b0dc5ba3f974d723df4f965492e3585/src/openvslam/data/keyframe.h#L218 These are advantageous in terms of execution speed, but disadvantageous in terms of readability and memory efficiency. In view of this, it is better to use unordered_set. In the design philosophy of OpenVSLAM, it is unnatural to prioritize execution efficiency over readability. Therefore, we need to remove these member variables.
There are similarities, but I think it is due to the fact that they share the same algorithm. We need to remove the member variables used as temporary variables described above.
num_trackedlms is a member variable that is used as a temporary variable and is unnaturally similar. num_trackedlms needs to be removed.
The similarities are negligible.
There are similarities, but I think it is due to the fact that they share the same algorithm.
There are a bit of similarities, but I think it is due to the fact that they share the similar algorithm. The main difference is that OpenVSLAM processes each candidate one by one, while ORB-SLAM2 allocates computational resources to each candidate a little at a time. (Off topic, In ORB-SLAM2, there are conditions under which outlier removal is not performed. This may be a bug. https://github.com/raulmur/ORB_SLAM2/blob/f2e6f51cdc8d067655d90a78c06261378e07e8f3/src/Tracking.cc#L1456-L1460 )
Overall, the processes related to request_reset have some very unnatural similarities, and the functions related to request_reset need to be removed.
No similar function was found.
It is similar, but very simple and there is no other way to express it.
It is similar, but very simple and there is no other way to express it.
There are a bit of similarities, but I think it is due to the fact that they share the same algorithm. In OpenVSLAM, when this module receives a pause request, it processes all the keyframes of the queue.
There are similarities, but very simple and there is no other way to express it.
There are similarities, but I think it is due to the fact that they share the same algorithm. In OpenVSLAM, it is parallelized and extended for Equirectangular image (in two_view_triangulator::check_depth_is_positive).
There are similarities, but I think it is due to the fact that they share the same algorithm. ORB-SLAM2 uses temporary variables as described in "Search local landmarks", while OpenVSLAM uses unordered_set.
It is similar, but very simple and there is no other way to express it.
There are a bit of similarities, but I think it is due to the fact that they share the same algorithm.
There are a bit of similarities, but very simple and there is no other way to express it.
There are a bit of similarities, but very simple and there is no other way to express it. OpenVSLAM uses atomic, while ORB-SLAM2 uses mutex.
There are a bit of similarities, but very simple and there is no other way to express it. I'm a bit concerned that it doesn't have an exclusive lock.
Overall, the processes related to request_reset have some very unnatural similarities, and the functions related to request_reset need to be removed.
There are similarities, but very simple and there is no other way to express it.
There is a slightly unnatural similarity. There is no reason to clear the keyframe queue when resuming. At
I think we should lock mtx_keyfrmqueue and then pause and clear the queue. During pause, keyframe insertion is stopped, so no additional keyframes will be added to the queue. See https://github.com/OpenVSLAM-Community/openvslam/blob/aa1f04810b0dc5ba3f974d723df4f965492e3585/src/openvslam/module/keyframe_inserter.cc#L29-L31
The line needs to be removed. Then make the above changes in mapping_module::run.
It is similar, but very simple and there is no other way to express it.
It is similar, but very simple and there is no other way to express it.
There are a bit of similarities, but very simple and there is no other way to express it.
It is similar, but very simple and there is no other way to express it. However, extra parentheses should be removed.
The repetition of bow_db_->add_keyframe(cur_keyfrm_);
is unnaturally similar. it is a process that is done regardless of the result of detect_loop_candidates, so it can be merged into one. It needs to be removed. No other unnatural similarities were found.
In select_loop_candidate_via_Sim3, As with "Relocalization in Tracking - relocalize in module::relocalizer", the use of computational resources in RANSAC is different.
In validate_candidates, the process of allowing keyframes to be erased is repeated, but it can be merged into one. This is unnaturally similar. It needs to be removed. No other unnatural similarities were found.
The following variables are temporary variables, but they are declared as member variables.
These are advantageous in terms of execution speed, but disadvantageous in terms of readability and memory efficiency. In view of this, it is better to use unordered_set. In the design philosophy of OpenVSLAM, it is unnatural to prioritize execution efficiency over readability. Therefore, we need to remove these member variables. No other unnatural similarities were found.
Overall, the processes related to request_reset have some very unnatural similarities, and the functions related to request_reset need to be removed.
It is similar, but very simple and there is no other way to express it.
The only unnatural similarity is the member variables used as temporary variables mentioned above.
I think x_right < 0
is correct for the following conditions. Even if you are using a stereo camera, it will be x_right < 0
in the point where the matching fails. This is a bug that exists only in OpenVSLAM.
The same bug exists in local_bundle_adjuster and pose_optimizer.
There are similarities, but I think it is due to the fact that they share the same algorithm/library(g2o).
There are similarities, but I think it is due to the fact that they share the same algorithm/library(g2o). ORB-SLAM2 uses temporary variable mnBALocalForKF
, while OpenVSLAM uses unordered_set. It's a matter of preference, but if (force_stop_flag && *force_stop_flag) {
is preferable to if (force_stop_flag) { if (*force_stop_flag) {
. I think the similarity is slightly unnatural.
There are similarities, but I think it is due to the fact that they share the same algorithm/library(g2o).
The member variable loop_fusion_identifier_
and ref_keyfrm_id_in_loop_fusion_
used as temporary variables mentioned above.
(Off topic, The following lines are unnecessary because it will always be false.)
(Off topic, The following lines are unnecessary.)
There are similarities, but I think it is due to the fact that they share the same algorithm/library(g2o).
It is derived from opencv; it is unclear which opencv ORB-SLAM2 and OpenVSLAM are based on for their implementations, but I think it is incorrect that there is no indication of the BSD license, since the expression is almost unchanged. The license notation needs to be added.
Initialize the variables used by IC_Angle. I think this is a derivative of opencv as well as the above. The license notation needs to be added. No other unnatural similarities were found.
This is based in part on the opencv process. Especially in ORB-SLAM2, some parts are copied almost without modification.
In ORB-SLAM2, I think this is a derivative of opencv as well as the above. The implementation in OpenVSLAM looks unique.
In ORB-SLAM2, I think this is a derivative of opencv as well as the above. The implementation in OpenVSLAM looks unique.
It is similar, but very simple and there is no other way to express it.
There are a bit of similarities, but it is due to the fact that they share the same algorithm.
There are similarities, but it is due to the fact that they share the same algorithm. In OpenVSLAM, masks can be set and are parallelized.
In OpenVSLAM, the process for portrait orientation images is different. There are a bit of similarities, but it is due to the fact that they share the same algorithm. In distribute_keypoints_via_tree, the sort result is unstable when the number of keypoints is the same.
The following points were made by AlejandroSilvestri (https://github.com/OpenVSLAM-Community/openvslam/issues/249#issuecomment-1019379866)
- The first obvious step in the process is to extract ORB descriptors from the image. Both ORB-SLAM2 and OpenVSLAM walk the same strange path before doing so (under different names)
I think this is considered a strange similarity because, for example, an image can also be converted in the system class and input to the tracking_module. We can't prove that the current structure is optimal in terms of readability or efficiency; we need to input an image or a preprocessed frame into tracking_module, but we need to determine when to do so based on our own policy.
One policy to solve this is to minimize the number of unnecessary functions for readability: if we generate frames in system, we can reduce the number of functions.
- the Frame class process the image in its constructor: this is a very arbitrary and odd programming decision, the same in both projects, and it's not the obvious or self-evident way to do things
It is helpful to see how ProSLAM is implemented.
https://github.com/AhmedShaban94/ProSLAM/tree/master/src/framepoint_generation
Currently, the cohesion is too low. It is unnatural to adopt such a design as is in OpenVSLAM, which is intended to be readable.
- track_monocular_image() constructs frame() in one of two different ways, depending on whether they are in initialization or tracking
- the main sequencer finite state machine is located in tracker, and is the same in both projects
I'll have to think about it in detail, but I think it's possible to have tracking_module return the result of initialization or tracking to system, and system manage the state and call different functions of tracking_module. From a readability point of view, we should choose a better way with OpenVSLAM.
- FAST keypoints are filtered by OctTree or QuadTree (same process, different name), when it is neither the most obvious nor the best way to do it
If there is a more appropriate algorithm for OpenVSLAM, I think it should be chosen. I have not been able to find one yet.
There are similarities, but I think it is due to the fact that they share the same algorithm. However, I am concerned that there is duplicate code in both. For example, the following code. It should fix duplicated sections of code.
There are similarities, but I think it is due to the fact that they share the similar algorithm. match_keyframes in OpenVSLAM skips the comparison with matched keypoints.
There are similarities, but I think it is due to the fact that they share the same algorithm.
There are similarities, but I think it is due to the fact that they share the similar algorithm. The similarity between CheckDistEpipolarLine and check_epipolar_constraint is negligible. The following statements are unique to OpenVSLAM.
There are similarities, but I think it is due to the fact that they share the similar algorithm.
The algorithm has been changed to be more flexible.
Both refer to the same link. It is similar, but very simple and there is no other way to express it. There is a 64-bit version in OpenVSLAM.
I'll skip the EPnP part; I compared it to https://github.com/cvlab-epfl/EPnP. It looked like it was created from scratch.
The similarities are negligible.
There are a bit of similarities, but it is due to the fact that they share the same algorithm.
It calls the following.
There are similarities, but it is due to the fact that they share the same algorithm.
There are a bit of similarities, but it is due to the fact that they share the same algorithm.
There are a bit of similarities, but it is due to the fact that they share the same algorithm.
Continued from https://github.com/OpenVSLAM-Community/openvslam/issues/37.
In summary, under efficiency constraints, if different expressions are considered, they should be removed and rewritten from scratch.