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

Channel control changes + ability to save channel config + image color histogram #78

Merged
merged 26 commits into from
Apr 3, 2021

Conversation

RFSH
Copy link
Member

@RFSH RFSH commented Feb 24, 2021

This PR will add tooltips to osd viewer. Summary of changes:

  • Modify channel-item and channel-list to use the new tooltips (Further Channel control improvements #76).
  • Add save button to channels (Ability to save channel settings #69)
  • Define tooltips to channel controls to give more information about the control and also show the value that they are about to choose. I was experimenting with adding a tooltip to indicate the value that users are about to select. At first I tried to show the tooltip while users hover over the slider. But as you can see here, doing so is not accurate. Since our slider is small, we cannot accurately translate the position of the mouse to the actual selected value. So for now I'm showing the tooltip while users are changing values.
  • Display image color histogram for debugging purposes.

@RFSH RFSH self-assigned this Feb 24, 2021
RFSH added 5 commits February 26, 2021 17:59
After discussing about the filters I realized what we're doing is
completely wrong. We're not supposed to change the R G B values
for contrast/brightness/gamma, and instead we should modify the
value (v in hsv format).

I also made sure that we're doing this once so we don't have to
go over the pixels multiple times.
@RFSH
Copy link
Member Author

RFSH commented Mar 4, 2021

After discussing the changes with @karlcz I realized what I'm doing for the filters is completely wrong. Each filter is supposed to change only part of the color value. I was applying all the function to each R G B value, but

  • Contrast/brightness/gamma are supposed to only changed the "value" in HSV format.
  • Hue should only affect "hue" in HSV format.

So I made the proper changes and also

  • Added a new saturation control
  • Changed the contrast control scale. The new scale will show a [-100, 100] range to users, where the given e input will be transformed by 10 ** (e/100) formula and used in the existing formula (So it would produce 0.1 to 10 values.)

@RFSH RFSH changed the title Add tooltip mechanism Add tooltip mechanism + channel control changes Mar 4, 2021
@RFSH
Copy link
Member Author

RFSH commented Mar 11, 2021

We had another discussion about this and decided that I should generate a intensity (value) histogram as a debugging tool so it's easier to figure out how the filters are working (for brightfield maybe RGB histogram might be better) and Ideally we might want both the before and after histograms.

Eventually we might want to change our filter logic to be based on the displayed image, and therefore we would need to know the min/max/medium intensity of the image. Ideally this should be generated once on load based on the highest resolution of image. But since that's not feasible we might want to do this based on the top of the pyramid image.

Other requested changes are:

  • Brightness should be from -1 to 1.
  • Tooltips:
    • Brightness should say "-1x of the contrast to +1x of the contrast".
    • Saturation should say "0% to 100%"
    • (Not sure about this one) For contrast we should mention "Contrast factor"

@RFSH RFSH changed the title Add tooltip mechanism + channel control changes Channel control changes + ability to save channel config Mar 27, 2021
@RFSH RFSH changed the title Channel control changes + ability to save channel config Channel control changes + ability to save channel config + image color histogram Mar 27, 2021
@RFSH
Copy link
Member Author

RFSH commented Mar 31, 2021

We realized that the contrast/brightness are difficult for users. So instead we decided to implement a intensity range. Users can pick the black_level and white_level values that will internally map to a slope and offset.

@RFSH RFSH merged commit a9d006e into master Apr 3, 2021
@RFSH RFSH deleted the channel-controls branch April 3, 2021 01:09
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

Successfully merging this pull request may close these issues.

1 participant