Skip to content

Update Connected component labelling bug #21794

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

Merged
merged 1 commit into from
Apr 1, 2022
Merged

Conversation

yash112-lang
Copy link
Contributor

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

Overview

This PR fixes issue #21783

@yash112-lang yash112-lang changed the title Update Connected component labelling bug #21783 Update Connected component labelling bug Mar 30, 2022
@MicheleCancilla
Copy link
Contributor

You have modified the wrong line...
Faulty code:

#define condition_e c+2<w && r-1>=0 && img_row_prev[c-1]>0

@yash112-lang
Copy link
Contributor Author

I had updated it @MicheleCancilla, sorry for the previous commit. Can you take a look at it?

@prittt
Copy link
Contributor

prittt commented Mar 30, 2022

@yash112-lang You correctly reverted the wrong change, but the original buggy line is still there. Moreover, instead of having 3 commits to fix one line of code is better to have just one (e.g. forcepushing on your repo).

@MicheleCancilla
Copy link
Contributor

MicheleCancilla commented Mar 30, 2022

Edit: now it's fine!

@yash112-lang
Copy link
Contributor Author

yash112-lang commented Mar 30, 2022

@yash112-lang You correctly reverted the wrong change, but the original buggy line is still there. Moreover, instead of having 3 commits to fix one line of code is better to have just one (e.g. forcepushing on your repo).
I think @prittt, the code was fine after the previous commit - Update connectedcomponents.cpp.

@prittt
Copy link
Contributor

prittt commented Mar 30, 2022

@yash112-lang You correctly reverted the wrong change, but the original buggy line is still there. Moreover, instead of having 3 commits to fix one line of code is better to have just one (e.g. forcepushing on your repo).

I think @prittt, the code was fine after the previous commit - @yash112-lang Update connectedcomponents.cpp.

@yash112-lang Yes, after your last commit it is.

To keep the history of the OpenCV repo as clean as possible, I suggest you to compress all changes (one line of code) in one single commit instead of five.

@yash112-lang
Copy link
Contributor Author

yash112-lang commented Mar 30, 2022

@prittt, When trying to squash all commits into one it shows me an error message like this - "Unable to reorder. Reordering replays all commits up to the last one required for the reordering. A merge commit cannot exist among those commits." I searched on Internet also but have not found a relevant answer can you please help me to deal with it.

Update connectedcomponents.cpp
@alalek
Copy link
Member

alalek commented Mar 31, 2022

Rebased to keep 1 commit only in PR.

Copy link
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contribution 👍

@MicheleCancilla Thank you for the review!

@opencv-pushbot opencv-pushbot merged commit af2b770 into opencv:3.4 Apr 1, 2022
@alalek alalek mentioned this pull request Apr 2, 2022
@opencv-pushbot opencv-pushbot mentioned this pull request Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Connected component labelling bug
5 participants