PDA

View Full Version : Pixel tweaker ???


nDman
22nd February 2005, 04:18
is there any plugin to tweak just one pixel directly?
a similar thing to avisynth tweak but working on just one pixel.
it's a very useful thing.

stickboy
22nd February 2005, 06:22
You can apply the filter and then use Crop + Overlay to apply it to the section you need.

Or you can load the frame in an image editor such as Photoshop, make your edit, and then splice that image back in.

E-Male
22nd February 2005, 06:24
wouldn't be hard to write, but what for??
please describe what you need it for

esby
22nd February 2005, 13:40
I think he wants to be able to fix one pixel in one particular frame, or something like that...

Now the problem is that if you are going to do that intensively, you are going to end with billion of filters in your chain, and you'll saturate the memory 'for nothing'.
Now you can still fix it by capturing the image and edit it manually.

esby

nDman
23rd February 2005, 01:01
to draw lines, shapes, graphs, ...
i was have an idea to draw a mathematical graph on blankclip and
overlay it on the movie.
it also can be used for making special effects.

thanks for your replays.

esby
23rd February 2005, 01:29
So that would be some kind of 'vectorial drawing' function inside of an avisynth script?
I can only think to some syntaxt like that:

clip = clip.vectorDrawing("mycommand.txt")

where mycommand.txt would contain the drawing instructions for each frame.
eg:
setColor(red)
setFrame(0)
DrawLine(0,0,10,0)
setColor(red)
setFrame(1)
DrawLine(1,0,10,0)
setFrame(2)
DrawLine(2,0,10,0)
(...)
setFrame(10)
DrawLine(10,0,10,0)
setFrameRange(0,10)
DrawLine(0,5,10,5)

something like that.

That would mean, supposing if I am not wrong:

* a custom parser for this filter.
* a list of command, and convention to use to draw.
* the giving methods to draw these.
* some overlay method to add it to the image

Right now, I don't have time to do that, but if anyone has other ideas about it, that could help anyone willing to do it. (or something similar)

esby

E-Male
23rd February 2005, 02:38
i agree that working on a per-pixel-basis will reasult in huge and ineffective scripts

but i'll see when i can get to do it

a drawline command for avisynth would be possible
i daubt such a commands file is necessary, but i can be done, too

also a function plotter is doable, but above me current skills i fear

esby
23rd February 2005, 02:48
well the separate command file idea is justified in my mind by three rules:

* Limit the number of filter instance to 1.
* do not mix filter specific dialog with avs scripting.
* allow external gui && application to write such command file.
( see my thinking direction http://esby.free.fr/prog/java/MiniDraw.v15.zip )

esby

PS: for those who wants to test minidraw... go in the classes folder, run a command interpreter there and do a >java MiniDraw

E-Male
23rd February 2005, 10:09
http://e-rels.dyndns.org/downloads/pixeledit.rar

usage:
pixeledit(x, y, f, r, g, b, xb, yb, fb, lw, rsx, srx)

parameters:
-x, y: x/y-coordinate of the pixel to by changed
-f: it's frame
-r, g, b: the new color

optional parameters:
-xb, yb: use these to draw a box from (x,y) to (xb,yb)
use negative values to enter the size of the box
default: -1
-fb: edit pixel(s) in frame f to fb
use negative values to enter teh number of frames to be edited
default: -1
-lw: line width: 0 = draw box
positive value draw line with specified width
negative value draw infinite line with specified width
default: 0
-rsx, rsy: relative size: if bigger than 0 these represent the resolution to draw in
at rsx==0 it's the pictures own resolution
default: 0, rsx

examples:
pixeledit(5, 10, 0, 254, 254, 254) <-- make pixel (5,10) in the first frame white
pixeledit(5, 10, 0, 0, 0, 0, 10, 15, 3) <-- draw a black box at (5,10)->(10,15) in the first 4 frames
pixeledit(5, 10, 0, 0, 0, 0, -5, -5, -3) <-- the same


@esby:
please recount (sorry couldn't resist :devil: ) *j/k*
i see your point
i personally would prefer thos three commands combined in one with more parameters
i'll see if i can add a parser to the plug-in

esby
23rd February 2005, 10:27
yeah, You are right, I can't count :)
Now, my logic is the same like subtitle vs textsub.
subtitle is useful, but if you have 300 lines to sub at different position, you'll probably rely on an external format :)
Now both can be useful.

esby

E-Male
23rd February 2005, 10:50
nice comparison
so here is something for you to try:

http://e-rels.dyndns.org/downloads/pixeleditf.rar

pixeleditf("x:\path\commandsfile.txt")

the commands-file should only include pixeledit parameters
like this:
10 10 0 254 0 0 120 120 -1 0 200 200
10 200 0 0 0 254 100 135 -5 -1 200 200
120 120 0 0 254 0 40 5 10 1 200 200

nDman
24th February 2005, 00:59
WoW.
Nice start. i'll do some test with it.
can you make it to call internal tweak function to modify pixels when R,G,B parameters are zero? Thanks.

E-Male
24th February 2005, 08:50
well, i see now reason to use tweak on one pixel, none at all, you'll have to explain what that could be used for before i'll do that work

i could do this:
i'll allow a second colorspace: YV12
in this mode a positiv r will mean g & b = brightness & contrast
negative r => g & b = hue & saturation
the later 2 can only be aplied to a group of 4 pixels (YV12 limitation), i'd have to see how i compensate that (divide coordinates by 2 or expect half size coordinates)

wuziq
2nd October 2006, 20:35
sorry about digging up an old thread.. but does anyone still have pixeledit.rar? :o

vcmohan
3rd October 2006, 04:43
to draw lines, shapes, graphs, ...


I am not sure I understood fully or correctly what you need. In my plugin colorit there is a function drawlines. With this one can draw lines on a blankclip ( or any base clip). I developed it for recoloring limiting purpose. But it can be used for any overlay. My plugin Grid can draw grids on any clip.

hartford
3rd October 2006, 05:43
is there any plugin to tweak just one pixel directly?
a similar thing to avisynth tweak but working on just one pixel.
it's a very useful thing.

Yeah, it's called "export the frame to your favorite graphic program
and modify it."

I'm suprised at the replies to this.

wuziq
4th October 2006, 20:31
Yeah, it's called "export the frame to your favorite graphic program
and modify it."

I'm suprised at the replies to this.

you could read what he wants it for.. :rolleyes:


to draw lines, shapes, graphs, ...
i was have an idea to draw a mathematical graph on blankclip and
overlay it on the movie.
it also can be used for making special effects.