Skip to content
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

Why does lego_getData() pass saturate true in the call to getRGB()? #16

Open
IAssemble opened this issue Aug 3, 2019 · 7 comments
Open

Comments

@IAssemble
Copy link

Hi,

I suspect it depends on what people are expected to be able to do from the LEGO EV3 software using the "Pixy2 Camera" block, By saturating the RGB values before returning them, a significant amount of information is lost. For example black (dark grey) reads as white.

Would it be reasonable to change this call so it does not saturate the result? Or alternatively to add the ability to control whether the result is saturated?

Thanks
David Gilday

@richlegrand
Copy link
Contributor

Hi David,
You raise some good points. We saturated by default because that (in our experience) is what most people want. What if we had a config flag that you could set for turning on/off saturation of the RGB value (?)

thanks
--rich

@IAssemble
Copy link
Author

HI Rich,

Thanks for your response. By a config flag do you mean a flag that would be available through the LEGO EV3 block programming environment? Or a configuration to compile the firmware in this mode? I would be happy with the former option.

Many thanks
David

@richlegrand
Copy link
Contributor

The config flag would be on the configuration dialog in PixyMon. You set it and Pixy2 will store in nonvolatile memory. I'm reluctant to change the args of the LEGO block because it will break people's programs.

@IAssemble
Copy link
Author

Hi Rich,

I'm not a fan of that idea. I am hoping to publish a LEGO EV3 program and modified instructions to allow people to use PIXY2 with my MindCub3r design and it would be much better if the saturation could be controlled directly from the program rather than having to explain to someone how to change the mode of their PIXY2. Also, having it as a configuration mode would also potentially break existing programs in subtle ways if it were configured as unsaturated when an existing program was expecting saturated values. Would it be possible to add an extra mode to the LEGO block to return unsaturated RGB in addition to the current saturated mode so that the existing modes would all still work and be compatible with existing programs?

Many thanks
David

@IAssemble
Copy link
Author

IAssemble commented Aug 10, 2019

Hi Rich,

Also the method you propose would make it awkward for people to alternate easily between two different programs on the EV3 which required saturated and unsaturated modes.

Thanks
David

@richlegrand
Copy link
Contributor

Hi David, I hear you loud and clear. :)

I'm working with my LEGO developer on the ins and outs of this.... I"m sorry that I don't have any updates for you.

best,
--rich

@IAssemble
Copy link
Author

Hi Rich,

Many thanks for the update. Please let me know if you'd like any more input or help testing.

Thanks
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants