Skip to content
This repository has been archived by the owner on Jun 3, 2023. It is now read-only.

Fails with higher-resolution images #8

Open
sersorrel opened this issue Oct 4, 2019 · 1 comment
Open

Fails with higher-resolution images #8

sersorrel opened this issue Oct 4, 2019 · 1 comment

Comments

@sersorrel
Copy link
Member

sersorrel commented Oct 4, 2019

In RoboCon 2018, we ran into an issue with libkoki when using the Raspberry Pi camera module, which can produce significantly higher-resolution images than the webcams SR typically use can. libkoki would intermittently fail this assertion:

libkoki/src/labelling.c

Lines 277 to 278 in 5b3c679

/* Check we do not exceed the maximum number of labels */
assert( lmg->aliases->len != KOKI_LABEL_MAX );

The fix we used is systemetric/libkoki@d84c77f, which just changes label_t from a 16-bit uint to a 32-bit uint and bumps KOKI_LABEL_MAX accordingly. I had (and still have) no idea if that's the correct thing to do, or if anything else needs changing as a result of that, but it seemed to work for us :)

No opinion on whether you should take this change or not, mostly just wanted to document an issue that we ran into.

(before shelling out for better cameras for SR, it's probably worth checking if high-resolution images actually help the marker recognition at all; I don't remember what the conclusion from my year of RoboCon was, but from what I've heard from this year, it's not clear if increasing the resolution actually has any effect apart from making it slower)

@rgilton
Copy link

rgilton commented Oct 4, 2019

Aye, I have used a similar fix for similar things in the past (processing images from a DSLR). Thanks for reporting the problem. I will dig out my patches for this. We can't just ship this immediately, as it will have a performance impact that needs assessing.

@rgilton rgilton changed the title Poor handling of high-resolution images Fails with higher-resolution images Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants