#!/bin/csh
#######################################################################################################################################
# #
# G E N E R A T I O N D ' U N E I M A G E A N A G L Y P H I Q U E #
# E N V R A I E S C O U L E U R S A P A R T I R D ' U N #
# C O U P L E S T E R E O S C O P I Q U E E N V R A I E S C O U L E U R S #
# C O M P A T I B L E A V E C L E S L U N E T T E S S T A N D A R D : #
# #
# #
# Utilisation : #
# #
# $xci/anaglyphe.31$Z <ImageGauche> <ImageDroite> <Stereogramme> [<Renormaliser>] #
# #
# #
# Author of '$xci/anaglyphe.31$Z' : #
# #
# Jean-Francois Colonna (LACTAMME, 20121001115347). #
# #
#######################################################################################################################################
set ImageGauche=$1
set ImageDroite=$2
set Stereogramme=$3
set Renormaliser=$4
setArgum Renormaliser $NEXIST
# Parametre introduit le 20130703155822 en garantissant la compatibilite anterieure... #
FilSTmpB LuminanceGauche
FilSTmpB LuminanceDroite
$xci/luminance.01$X \
A=$ImageGauche \
R=$LuminanceGauche \
$formatI
$xci/luminance.01$X \
A=$ImageDroite \
R=$LuminanceDroite \
$formatI
# Recuperation des luminances des images Gauche et Droite... #
source $xci/anaglyphe.31$Y
# Definition du codage 'RVB' des vues oeil Gauche et oeil Droit... #
FilSTmpB StereogrammeGauche
FilSTmpB StereogrammeDroite
$xci/scale$X \
A=$LuminanceGauche \
a=`calcul $NiveauGR/$BLANC` \
R=$StereogrammeGauche$ROUGE \
$formatI
$xci/scale$X \
A=$LuminanceGauche \
a=`calcul $NiveauGV/$BLANC` \
R=$StereogrammeGauche$VERTE \
$formatI
$xci/scale$X \
A=$LuminanceGauche \
a=`calcul $NiveauGB/$BLANC` \
R=$StereogrammeGauche$BLEUE \
$formatI
# Codage 'RVB' de la vue oeil Gauche... #
$xci/scale$X \
A=$LuminanceDroite \
a=`calcul $NiveauDR/$BLANC` \
R=$StereogrammeDroite$ROUGE \
$formatI
$xci/scale$X \
A=$LuminanceDroite \
a=`calcul $NiveauDV/$BLANC` \
R=$StereogrammeDroite$VERTE \
$formatI
$xci/scale$X \
A=$LuminanceDroite \
a=`calcul $NiveauDB/$BLANC` \
R=$StereogrammeDroite$BLEUE \
$formatI
# Codage 'RVB' de la vue oeil Droit... #
execRVB $xci/maximum$X \
A1=$StereogrammeGauche%s \
A2=$StereogrammeDroite%s \
R=$Stereogramme%s \
$formatI
# Enfin, generation du stereogramme... #
FilSTmpE StereogrammeDroite
FilSTmpE StereogrammeGauche
FilSTmpE LuminanceDroite
FilSTmpE LuminanceGauche
if ($Renormaliser == $EXIST) then
$xci/acces_RVB.11$Z $Stereogramme $Stereogramme
# Renormalisation eventuelle introduite le 20130703155822... #
else
endif