visp icon indicating copy to clipboard operation
visp copied to clipboard

Update brightness tutorial

Open s-trinh opened this issue 1 year ago • 2 comments
trafficstars

Update brightness tutorial:

  • use vpDisplayFactory and scale the image by 2 for small display resolution
  • display both color and gray results
  • cycle across the different automatic gamma method to display the results

s-trinh avatar Oct 13 '24 10:10 s-trinh

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 53.90%. Comparing base (520efed) to head (db58506). Report is 23 commits behind head on master.

Files with missing lines Patch % Lines
modules/imgproc/src/vpImgproc.cpp 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1482      +/-   ##
==========================================
+ Coverage   53.88%   53.90%   +0.02%     
==========================================
  Files         442      442              
  Lines       53778    53791      +13     
==========================================
+ Hits        28978    28996      +18     
+ Misses      24800    24795       -5     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 13 '24 13:10 codecov[bot]

Not a tutorial code but I have added tutorial-compare-auto-gamma.cpp sample code that can be used to easily compare the results between the different auto Gamma methods.

Can be used with one image:

  • ./tutorial-compare-auto-gamma --input Sample_low_brightness.png

or with a sequence of images:

  • ./tutorial-compare-auto-gamma --input visp-images/mbt/cube/image%04d.png --output Results/cube

I don't know if the inverse Gamma is needed here: https://github.com/lagadic/visp/blob/a65eebc2fffc3814889fbe40c3b1a8ee182d1bd4/modules/imgproc/src/vpImgproc.cpp#L332

Without

log_gamma_computed=0.254357

Sample_low_brightness_without

log_gamma_computed=2.69225

image0197_without

log_gamma_computed=1.24885

  • image from wikimedia

1024px-Manarola_NW_Cinque_Terre_Sep23_A7C_07233

01

02

03

04

05

06

With

Sample_low_brightness_with

image0197_with

1024px-Manarola_NW_Cinque_Terre_Sep23_A7C_07233

01

02

03

04

05

06

s-trinh avatar Oct 18 '24 21:10 s-trinh