[Bf-committers] Re: Re: Vectorial Motion Blur

frédéric van der essen fred at mentalwarp.com
Sun Feb 13 17:39:34 CET 2005


the non moving pixels aren't blurred since the vector length is zero.
The thing that wasn't really clear in my post is that you need to take 
in count the pixels forward on the vector length, but also backwards.
I wrote a little program in matlab to see if the algo is suitable, and 
it looks ok.

I  really should learn python or C :S

here is the algo :

A=zeros(255,255); %base image
%Add Black square
BlockSize=10;
BlockPosX=10;
BlockPosY=10;
for i=BlockPosX:(BlockPosX+BlockSize)
    for j=BlockPosY:(BlockPosY+BlockSize)
        A(i,j)=1; % set pixels in the square =1
    end
end
B=zeros(255,255); % the motion blurred image

for i=5:250 % from 5 to 250 because the blur needs a margin.
    for j=5:250
        B(i,j)=( A(i,j)+A(i+1,j+1)+A(i+2,j+2)+A(i-1,j-1)+A(i-2,j-2) ) 
/5; % computes the blur on a 5pixels length with a -45° direction
    end
end



GSR - FR wrote:

>Hi,
>fred at mentalwarp.com (2005-02-12 at 2253.56 +0100):
>  
>
>>I think that the method would be for each pixel you calculate the 
>>average color of the x pixels lying under the vector. It would be like a 
>>blur, but instead of  finding the average color with a radius you do it 
>>with a line.
>>the length of the vector determines how much pixel you need to take for 
>>your blur.
>>    
>>
>
>Uh? Or I do not understand or your method is wrong.
>
>Lets say we have a single black pixel that moves, all the other pixels
>white and static, and the vector says it moves to the right:
>
>   @---->
>
>So the result should be a grey dot, result of averaging all the whites
>and the black, with still lots of white around it:
>
>   =
>
>It does not sound pretty motion blurish... the moving pixel seems
>static and the static pixels seem to move into the moving one. ?:|
>
>GSR
> 
>_______________________________________________
>Bf-committers mailing list
>Bf-committers at projects.blender.org
>http://projects.blender.org/mailman/listinfo/bf-committers
>
>  
>



More information about the Bf-committers mailing list