Roxame Home - Diccan Home

Framing

Main commands

frame : frame around the non white (total of the RVB values smaller than 600) points
frameC : around refcol points
frame_blues : around blue points (hue between 170 and 220)
frame_greens : around green points
frame_reds : around red point
frame_vivid or frame_vivids around vivid points (sat > 700)

reframe crops the image arount the frame computed as above

( framecount counts the frames in film generation)

Philosophy

The idea seems simple at first sight : reframe a picture to keep its more intersting, beautiful, meaningful part.

For example if we have an object in front of a solid white background, juste draw a frame around the non white points. That works sometimes. But in general you must make some simplifications. For instance a "posterization".

frameC makes a frame around the points corresponding to a definite refCol, called for instance by its name (e.g. blue), but to get reliable results, the image must at first be aligned upon a palette containing this color (e.g. quadri contains blue

What is "meaningful"

For a refrmaing to be pertinent
- the framed part must not be too small, since in this cas it is probably a meaningless spot; besides, if we have too little plxels, the reframing will generate strong aliasing
- not too large, since then the reframing will not change the work "meaninffulle"

Recognition of important pattern : faces
Of global characteristics. (woktype)
color : local. relate to a palette/accept overlpping of colors
color names/ color figures (RGB, HSV)
orinigal color of the object + lighting

Then there are aesthetic constraints. If you reframe the object margin to margin, it wont generally be pleasant.

Programming tips

The code : Formats The hub for Format functions

There are several cases of insertion of a picture into a "frame", which is a region

1. Form generation. That is done mainly by the Report(refClip) function
It prepares an img3 image, sent to Mix(1,1) , one frame, source is form generation

2. External image. load, next, preced, first, last, random-file , or an image named in dico (CAT Doc or doc) load an image in img2 (problem about the size), and sends it to preMix().

preMix prepares an img3 image, which has the same proportion as the target region
premix is parametered by refInsert : stretch, homoth, crop, complement, fram

then Mix(1,0), one frame, source is an image , inserts img3 into img.

Frame
Uses global variables sourceImage : 1 if the Frame command is given from the GUI, (then the source is refReg in img) 2 : source is img2 ,
Frame assigns values to the global variables f= 1rameXd.. frameYf

these values are then used by reFrame, which copies it in imgx, then
- in img if sourceImage =1
- in img3 if sourceImage = 2

 

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.