Please log in. To create a new account, enter the name and password you want to use.
If you supplied an email address when you signed up or added a email later, you can have your password reset.
This user name doesn't exist. If you want to create a new account, just verify your password and log in.
This user name exists. If you want to create a new account, please choose a different name.
Enter the current email address you have registered in your profile. You'll get an email containing your new password.
You have no email address in your profile, so you can't have your password reset.
Password reset. Check your email in a few minutes
That account does not exist.
The email address specified is not registered with this account.
Delivery to this email address has failed.
Dummy said: I'm definitely interested. I've been digging into FXAA and different AA algorithms, but couldn't find anything useful for still images.
By sobel based blurring do you mean blurring constrained by sobel edge-detect?
Basically FXAA isn't real AA and all it does is is blur edges based on the depth of the pixels in 3D space. We don't have depth so we need to use the edges. I gave it a bit of a go this morning. Got ok results. MATLAB source code, not optimized at all
[file,path]=uigetfile('*.*'); original=imread([path,file]); mask=edge(rgb2gray(original)); mask = bwmorph(mask,'close'); mask = bwmorph(mask,'skel',Inf); figure; imshow(mask); kern=fspecial('gaussian',[3 3],1); kern=kern/max(kern(:)); fiterd=zeros(size(original)); weight=zeros(size(original)); for i=2:size(original,1)-1 for j=2:size(original,2)-1 if mask(i,j) for a=1:3 for b=1:3 absx=i+a-2; absy=j+b-2; keeping=weight(absx,absy)/(weight(absx,absy)+kern(a,b)); fiterd(absx,absy,:)=fiterd(absx,absy,:)*keeping+double(original(i,j,:))*(1-keeping); weight(absx,absy,:)=weight(absx,absy,:)+kern(a,b); end end end end end
traz64
almost 8 years agoI gave it a bit of a go this morning. Got ok results.
MATLAB source code, not optimized at all
[file,path]=uigetfile('*.*');
original=imread([path,file]);
mask=edge(rgb2gray(original));
mask = bwmorph(mask,'close');
mask = bwmorph(mask,'skel',Inf);
figure;
imshow(mask);
kern=fspecial('gaussian',[3 3],1);
kern=kern/max(kern(:));
fiterd=zeros(size(original));
weight=zeros(size(original));
for i=2:size(original,1)-1
for j=2:size(original,2)-1
if mask(i,j)
for a=1:3
for b=1:3
absx=i+a-2;
absy=j+b-2;
keeping=weight(absx,absy)/(weight(absx,absy)+kern(a,b));
fiterd(absx,absy,:)=fiterd(absx,absy,:)*keeping+double(original(i,j,:))*(1-keeping);
weight(absx,absy,:)=weight(absx,absy,:)+kern(a,b);
end
end
end
end
end
invweight=max(weight(:))-weight;
result=invweight.*double(original)+fiterd.*weight;
result=result/max(result(:));
figure;
imshow(result)
imsave()
Edit: The lines are a bit thick looking. I think I'll play around with it a bit more.