Skip to content

Conversation

szk1509
Copy link
Contributor

@szk1509 szk1509 commented Mar 22, 2019

This pullrequest introduces the detection of inverted markers

i.e. it allows to detect white markers on a black background

Inverted Marker
inverted

Enclosed-Inverted Marker
img

@szk1509
Copy link
Contributor Author

szk1509 commented Mar 22, 2019

hi @alalek ,
Thank you for your advice :)
I've already corrected the issues (made the changes from #2036 on this new branch), so I will delete the other branch later.
Sorry about the delay and the inconveniences 🍎

// to get from 255 to 1
int invBError = _getBorderErrors(~candidateBits-254, dictionary->markerSize, params->markerBorderBits);
// white marker
if(invBError<borderErrors){
Copy link
Member

Choose a reason for hiding this comment

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

Please fix indentation (it is "jumping").

for(int yaw = 30; yaw <= 90; yaw += 50) {
for(double distance = 0.1; distance < 0.7; distance += 0.2) {
for(int pitch = 0; pitch < 360; pitch += (distance == 0.1? 60:180)) {
for(int yaw = 70; yaw <= 120; yaw += 40){
Copy link
Member

Choose a reason for hiding this comment

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

int yaw = 70; yaw <= 120; yaw += 40

yaw: 70, 110 ?

Old yaw values are: 30, 80

Copy link
Contributor Author

Choose a reason for hiding this comment

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

even though the detection of a default marker happens using that yaw value, it was not the case for the inverted marker, however, it also occurs in the opposite way, that is, where the inverted marker is detected more easily than the default marker.

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!

@alalek alalek merged commit ffd13f9 into opencv:3.4 May 30, 2019
@alalek alalek mentioned this pull request Jun 5, 2019
Saafke pushed a commit to Saafke/opencv_contrib that referenced this pull request Jun 24, 2019
* added detection of inverted Markers, tests included

* corrections added, default preserved, identation, var, comment
@hamddan4
Copy link

hamddan4 commented Oct 9, 2019

The dictionary has to be inverted too?

@szk1509
Copy link
Contributor Author

szk1509 commented Oct 10, 2019

Hi @hamddan4,
The dictionary does not need to be inverted too

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.

3 participants