Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #@gmic retinex : _value_offset>0,_colorspace={ hsi | hsv | lab | ycbcr },0<=_min_cut<=100,0<=_max_cut<=100,_sigma_low>0,_sigma_mid>0,_sigma_high>0
- #@gmic : Apply multi-scale retinex algorithm on selected image to improve color consistency.
- #@gmic : (as described in the page http://www.ipol.im/pub/art/2014/107/).
- #@gmic : Default values: 'offset=1', 'colorspace=lab', 'min_cut=1', 'max_cut=1', 'sigma_low=15','sigma_mid=80' and 'sigma_high=250'.
- retinex : -check "${1=5}>0 && ${3=1}>=0 && $3<=100 && ${4=1}>=0 && $4<=100 && ${5=15}>0 && ${6=80}>0 && ${7=250}>0" -skip "${2=lab}"
- -e[^-1] "Apply Retinex color consistency algorithm on image$?, with value offset $1, colorspace '$2', cuts ($3,$4) and sigmas (${5-7})."
- -v -
- -if {;'$2'=='hsi'} mode=hsi_i
- -elif {;'$2'=='hsv'} mode=hsv_v
- -elif {;'$2'=='lab'} mode=lab_l
- -elif {;'$2'=='ycbcr'} mode=ycbcr_y
- -else -v + -error[0--2] "Command '-retinex': Invalid colorspace argument '$2'."
- -endif
- -ac "-_retinex $1,${3--1}",$mode
- -v +
- _retinex :
- -- {im-$1} {[w,h,d,s]}
- -repeat 3 --b[0] {arg(1+$>,${4-6})} --/[0,-1] -rm.. -log. -+[1,-1] -done
- -rm[0] -c $2%,{100-$3}% -n 0,255
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement