palette


simple graphic palette

palette
Menu
Short cuts
Simple use
Dynamic palette
Programmable palette
Example
See also

palette

       Switches to a very simple 2D palette mode which cannot replace the wealth of a programmable palette: multiple brushes, automatic, dynamic, possibly connected to sensors via neural networks, etc..

Options

back(r,g,b): background color (black default).
coe(cx,cy): when displayed the sizes of the image can be choosen on 2 scales in [cx,DX/cx] and [cy,DY/ccy] (with DX,DY = sizes of thz screen).
directory(): directory (ima default).
name("*.eee": eee is the extension of the images (bmp by default).
secx(x1,x2,...)secy(y1,y2,...): when displayed the sizes of the image can be choosen on 2 scales nx=x1,x2,... and ny=y1,y2,....
By default (64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088).

Menu

The following menu is displayed by pressing the right button of the mouse:

help
val
read image
define brush
define network lum
define network col
displ image
choose brush
win
line
contour
smooth
transp
medallion
paint
save image
hide
remove image
end
quit

help

displays the help.

val

validate the current operation.

read image

loads image files:
click on name or type a name: loads file name. click on num: copy this file in image num, the current image number is incremented.
click on reset images: resets all images to their initial values.

define brush

click on num_brush.
type
col
transp
radius
rotz
diat
alea
rand

type1:
       disk:: circular.
       rectangle: rectangular.
       win: the image generated by win is associated to the brush. (must be window).
       line: the image generated by lin is associated to the brush. (must be line).

type2:
       nul: no type2
       smooth: smooth:
              click on smooth: size of the convolution matrix.
              click on num_ima: number of the image associated to the brush.
       texture: texture:
              click on num_ima: number of the image associated to the brush.
       network_1: luminance neural network (must be define network lum).
       network_3: color neural networks (must be define network color).
              click on image_network:
                     if num > 0: the network takes his pixel informations in the image num (image brush(id)=num: avoiding brush overlap).
                     if -1: the network takes his pixel informations in image num_ima itself (producing brush overlap).

bru_col:
       1: r1,g1,b1 = color.
       2: r1,g1,b1, r2,g2,b2 = color at center and on the edge.

bru_transp:
       1: t1 = transparency.
       2: t1,t2 = transparency at center and on the edge.

rx,ry: radius.

alea: reproductible random.
rand: no reproductible random.

rotz: z rotation.

dist: minimum capture distance.

network lum

Defines a network, change the scales:
       nx,ny: x,y sizes.
       hide: number of hidden layers (increase if no convergence).
       nb: number of learning couples.
       rand: randomly generate motif and law number num.
The motifs are displayed green, laws are displayed red and the validate motif network are displayed yellow.

network col

Defines three networks (for the red, green and blue components), change the scales as define network lum.

displ image

Choose num_image.
Choose sizes on the scales nx ny.
Click on validate displ image to copy this image in memory (available for painting).

choose brush

click on num_brush makes this brush the current one.

win

choose the number of the image to been isplayed.
draw a frame, the inside image is stocked and can be used in define brush type win.

line

choose the number of the image to been isplayed.
raw a line, then click on validate line: the inside image is stocked and can be used in define brush type line.
One can change:
dist: minimum capture distance.
adjust: number of points added on each segment.
ext: ext coefficient.
rem: removes the latest point.

contour

contour extractiuon:
choose the number of the image to been isplayed.
change coe and smooth.
Click on save to save in image number num.

smooth

image smooth:
choose the number of the image to been isplayed.
change smooth.
Click on save to save in image number num.

transp

transp image(num2)=t:
choose image1 (behind), num2 (transparent).
change transp.
Click on save to save in image number num.

medallion

image(num1,num2)center(x,y)radius(rx,ry)transp(t1,t2):
choose image1 (behind), num2 (transparent).
change transparencies t1,t2, radius rx,ry, then click in the image.
Click on save to save in image number num.

paint

just left click.
menu -> validate or press V key to save image in memroy (needed for retrieving the same image after execution of other function).

save image

choose the number of the image to been isplayed.
ype name.eee in frame name: saves the current image in file name.eee.

hide

doesnot display the textes, make : (colon) to retrieve the display.

remove image

removes all images (YES), or not (NO).

end

returns to interpreter mode.

quit

exits the programme.

Short cuts


H: help
V: validate
I: read image
B: define brush
l: define network lum
c: define network col
d: displ image
b: choose brush
p: paint
W: win
L: line
C: contour
S: smooth
T: transp
M: medallion
s: save image
:: hide
r: remove image
q: quit

Simple use

Read images

click on read image
       type ciel.bmp after name, then ENTER.
       click on num_ima 1: image ima/ciel.bmp is loaded in image 1.
       type visa.bmp after name, then ENTER.
       click on num_ima 2: image ima/visa.bmp is loaded in image 2.

Define a brush

click on define brush:
       click on num_brush 1.
       click on disk.
       change rx and ry.

Display an image

Click on displ image:
       Click on num_ima 1.
       Click on validate displ image: save the image in memory.

Paint

click on paint:
       the last validated image 1 is displayed, just click left and drag the mouse.
Press V key to save image in memroy, to write on the disk click on save image.

Define other brush

click on define bnrush:
       click on num_brush 2.
       click on rectangle.
       change rx and ry.
       click on col 2:
              choose r1,g1,b1, r2,g2,b2: interpolated colors.
       click on transp 2:
              choose t2 = 1

click again on paint and continue drawing with the new brush.

Change the brush

click on choose brush then on num_brush.

Neural brush

click on define network col:
       3 neural networks (for red, green and blue components) are displayed, click on define brush:
click on num_brush 3.
       click on network_3.
       click on image_network 1
       click on transp 2, t2=1.
       change rx,ry
click on paint
Press v key; shows the capture and its transformation by the network.

More advanced palette

exemple_brush.func

Dynamic palette

A dynamic brush associated to an dynamic image defines a dynamic palette for which the trace of the brush continues to live (for example with image spring) independently.
Pratically must be:
1) Defined a dynamic image id_im, for example:
       dynamic image(id_im)=1;
       mass image(id_im)=1;
       spring image(id_im)=.1,-.01;
2) Definde a dynamic brush of type image id_pi associated to image id_im:
       brush(id_pi)image dynamic;
       texture brush(id_pi)=id_im;

programmable palette

call back

palette func(n,"Fn"); execute functions in continous on the brushes.
The trajectories are avaiable for all brushes properties.
The dynamic is avaiable.
We can define genetic images or brushes populations.
They can be connected to outputs of neural networks whose inputs can be connected to various sensors.

Example

menu -> read image
click on name (for example ciel.bmp): this image is displayed
click on num ima 1: this image is memorized as number 1
click on an another image name (for example CRY2307.bmp: this image is displayed
click on num ima 2: this image is memorized as number 2

menu -> display image
click on num_image 1: the first image is displayed
click on num_image 2: the second image is displayed
click on validate displ image 2:this image is memorized in memory

menu -> paint: draw (right click) in the image with the default brush
menu -> validate: saves in memory

menu -> display image
click on memory: this image is displayed

menu -> window
click num image: displays this image
draw a frame in the image: this windo is saved

menu -> line
click num image: displays this image
draw a line in the image
menu -> validate: the interior of this line is saved

menu -> define brush
click on num_brush 1
click on type1 rectangle
change radius rx, ry
try changing other scales
click on num_brush 2
click on type1 win
click on num_brush 3
click on type1 win
click on num_brush 4
click on type1 line

again menu -> paint: draw (right click) in the image with the last brush
menu -> validate: saves this image
you can change the brush with menu -> choose brush, or define new brush by menu -> define brush

menu -> contour
click on num image and change the scales: contour extraction
click on save 3: saves this image in memory

menu -> save image
click on a num_image: this image is diaplayed
enter an image name after name (for example foo.bmp): saves this image in file foo.bmp

See also:

brush
image
no brush
no palette
type palette
yes brush
yes palette