mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Fixed some issues found by static analysis
This commit is contained in:
@@ -59,7 +59,7 @@ struct CV_EXPORTS CameraParams
|
||||
{
|
||||
CameraParams();
|
||||
CameraParams(const CameraParams& other);
|
||||
const CameraParams& operator =(const CameraParams& other);
|
||||
CameraParams& operator =(const CameraParams& other);
|
||||
Mat K() const;
|
||||
|
||||
double focal; // Focal length
|
||||
|
||||
@@ -207,7 +207,7 @@ struct CV_EXPORTS MatchesInfo
|
||||
{
|
||||
MatchesInfo();
|
||||
MatchesInfo(const MatchesInfo &other);
|
||||
const MatchesInfo& operator =(const MatchesInfo &other);
|
||||
MatchesInfo& operator =(const MatchesInfo &other);
|
||||
|
||||
int src_img_idx, dst_img_idx; //!< Images indices (optional)
|
||||
std::vector<DMatch> matches;
|
||||
|
||||
@@ -50,7 +50,7 @@ CameraParams::CameraParams() : focal(1), aspect(1), ppx(0), ppy(0),
|
||||
|
||||
CameraParams::CameraParams(const CameraParams &other) { *this = other; }
|
||||
|
||||
const CameraParams& CameraParams::operator =(const CameraParams &other)
|
||||
CameraParams& CameraParams::operator =(const CameraParams &other)
|
||||
{
|
||||
focal = other.focal;
|
||||
ppx = other.ppx;
|
||||
|
||||
@@ -625,7 +625,7 @@ MatchesInfo::MatchesInfo() : src_img_idx(-1), dst_img_idx(-1), num_inliers(0), c
|
||||
|
||||
MatchesInfo::MatchesInfo(const MatchesInfo &other) { *this = other; }
|
||||
|
||||
const MatchesInfo& MatchesInfo::operator =(const MatchesInfo &other)
|
||||
MatchesInfo& MatchesInfo::operator =(const MatchesInfo &other)
|
||||
{
|
||||
src_img_idx = other.src_img_idx;
|
||||
dst_img_idx = other.dst_img_idx;
|
||||
|
||||
@@ -1047,7 +1047,16 @@ void DpSeamFinder::updateLabelsUsingSeam(
|
||||
for (std::map<int, int>::iterator itr = connect2.begin(); itr != connect2.end(); ++itr)
|
||||
{
|
||||
double len = static_cast<double>(contours_[comp1].size());
|
||||
isAdjComp[itr->first] = itr->second / len > 0.05 && connectOther.find(itr->first)->second / len < 0.1;
|
||||
int res = 0;
|
||||
if (itr->second / len > 0.05)
|
||||
{
|
||||
std::map<int, int>::const_iterator sub = connectOther.find(itr->first);
|
||||
if (sub != connectOther.end() && (sub->second / len < 0.1))
|
||||
{
|
||||
res = 1;
|
||||
}
|
||||
}
|
||||
isAdjComp[itr->first] = res;
|
||||
}
|
||||
|
||||
// update labels
|
||||
|
||||
Reference in New Issue
Block a user