Hi.
I maybe solved first part of problem. with this run("RGB Stack"); run("Scale...", "x=.99919 y=.99919 title=Untitled"); setSlice(3); run("Scale...", "x=0.999 y=0.999 title=Untitled"); run("RGB Color"); But now I need detect edge, smooth, create mask from image and remove fringe under mask. -------------------------- Original message -------------------------- From: Tomáš Procházka <[hidden email]> Subject: chromatic aberattion Date: Friday, June 13, 2008, 7:58:22 PM Attachments: <none> msgid:[hidden email] TP> Hi. TP> I neeed automatic tool for remove chromatic aberration from many TP> images. And because I'm java programmer i choose ImageJ. But I'm not graphics programmer :-( TP> I tested commercial software before and best result I got with TP> Adobe Light Room and DxO optics Pro. Adobe LR move red/Cyan TP> Blue/Yellow planes and then defringe edges, but defringe effect TP> it's too small and I must use DxO for it, here is example: TP> http://www.atomsoft.cz/public/archive_public/foto_100fs/aberration_remove/step1_original.jpg TP> http://www.atomsoft.cz/public/archive_public/foto_100fs/aberration_remove/step2_LightRoom.jpg TP> http://www.atomsoft.cz/public/archive_public/foto_100fs/aberration_remove/step3_DxO.jpg TP> here is complete image: TP> http://www.atomsoft.cz/public/archive_public/foto_100fs/aberration_remove/99653_1_40-0.jpg TP> http://www.atomsoft.cz/public/archive_public/foto_100fs/aberration_remove/99653_1_40-1_LightRoom.jpg TP> http://www.atomsoft.cz/public/archive_public/foto_100fs/aberration_remove/99653_1_40-2_LightRoom_DxO.jpg TP> another examples: TP> http://www.atomsoft.cz/public/AutoIndex/index.php?dir=foto_100fs/aberration_remove/ TP> I searched in this forum and I found this: TP> http://www.dentistry.bham.ac.uk/landinig/software/software.html TP> Align_RGB_planes TP> But this only shift planes, no defringe edges. And it's hard to control. Exist better plugin? TP> ----------------------- End of original message ---------------------- -- Tomas Prochazka |
On Friday 13 June 2008, Tomáš Procházka wrote:
> I maybe solved first part of problem. > > with this > > run("RGB Stack"); > run("Scale...", "x=.99919 y=.99919 title=Untitled"); > setSlice(3); > run("Scale...", "x=0.999 y=0.999 title=Untitled"); > run("RGB Color"); Hi, Yes this may work nicely, but note that there is a limit of the accuracy of the Scale command. I do not think that you will be able to scale the plane by less than 1 pixel steps (i.e. target plane size/current plane size will be stepped will be limited to the corresponding nearest 1 pixel values). There will be a also limit to what one can correct as not all the colours will be present in a unique rgb plane. I wonder if scaling the image x2 and using interpolation, align and scale back to 0.5) would make any difference (as it would allow to position the planes at 1/2 pixel locations of the original image). Not sure if this would be useful or just blur the original. > But now I need detect edge, smooth, create mask from image and remove > fringe under mask. I do not understand what you mean here. Regards, G. |
Hi,
G> I wonder if scaling the image x2 and using interpolation, align and scale back G> to 0.5) would make any difference (as it would allow to position the planes G> at 1/2 pixel locations of the original image). Not sure if this would be G> useful or just blur the original. Thanks you, this is good idea. >> But now I need detect edge, smooth, create mask from image and remove >> fringe under mask. G> I do not understand what you mean here. Look at this pictures: http://www.atomsoft.cz/public/archive_public/foto_100fs/aberration_remove/step1_original.jpg http://www.atomsoft.cz/public/archive_public/foto_100fs/aberration_remove/step2_LightRoom.jpg The same result as last image I get from ImageJ. In image still exist purple/violet fringe. I need localize it and remove. I think, that best way is found edges (dark-white crossing) and desaturate image under edges or remove only purple/violet fringe. Here is example how DxO Optixs Pro do it: http://www.atomsoft.cz/public/archive_public/foto_100fs/aberration_remove/step3_DxO.jpg -------------------------- Original message -------------------------- From: Gabriel Landini <[hidden email]> Subject: chromatic aberattion Date: Saturday, June 14, 2008, 12:17:34 PM Attachments: <none> msgid:[hidden email] G> On Friday 13 June 2008, Tomáš Procházka wrote: >> I maybe solved first part of problem. >> with this >> run("RGB Stack"); >> run("Scale...", "x=.99919 y=.99919 title=Untitled"); >> setSlice(3); >> run("Scale...", "x=0.999 y=0.999 title=Untitled"); >> run("RGB Color"); G> Hi, G> Yes this may work nicely, but note that there is a limit of the accuracy of G> the Scale command. I do not think that you will be able to scale the plane by G> less than 1 pixel steps (i.e. target plane size/current plane size will be G> stepped will be limited to the corresponding nearest 1 pixel values). G> There will be a also limit to what one can correct as not all the colours will G> be present in a unique rgb plane. G> I wonder if scaling the image x2 and using interpolation, align and scale back G> to 0.5) would make any difference (as it would allow to position the planes G> at 1/2 pixel locations of the original image). Not sure if this would be G> useful or just blur the original. >> But now I need detect edge, smooth, create mask from image and remove >> fringe under mask. G> I do not understand what you mean here. G> Regards, G> G. ----------------------- End of original message ---------------------- -- Tomas Prochazka |
On Saturday 14 June 2008 18:38:59 Tomáš Procházka wrote:
> In image still exist purple/violet fringe. I see. I looked around and I found this interesting page: http://ray.cg.tuwien.ac.at/rft/Photography/TipsAndTricks/Aberration/ which suggests 2 things: 1. expand rather than shrink the planes (so one avoids the loss of image at the borders). In this case we expand the green channel rather than shrinking the red and blue. 2. desaturating the edges The macro below tries those ideas and does a fairly decent job on the bicycle image you posted. // Colour Aberration Correction setBatchMode(true); a=getTitle(); run("RGB Stack"); setSlice(2); run("Scale...", "x=1.00081 y=1.00081 interpolate"); run("RGB Color"); run("HSB Stack"); setSlice(3); run("Duplicate...", "title=edges"); run("Exp"); run("Gaussian Blur...", "sigma=5"); run("Find Edges"); run("Gaussian Blur...", "sigma=5"); run("Divide...", "value=2"); selectImage(a); setSlice(2); //de-saturate strong edges imageCalculator("Subtract", a,"edges"); run("RGB Color"); setBatchMode(false); The green plane expansion, amount of desaturation and Gaussian blur radii are completely empirical so there might be better values for these. Perhaps the desaturation should be applied less strongly in the centre than at the extremes of the image so a radial weighting might be more appropriate. One can apply more desaturation, (for instance by not dividing the edges by 2) but other parts of the image lose their colour (for instance the canopy of the the trees in the background). Please post back any improvements. Regards, Gabriel |
In reply to this post by Tomáš Procházka-2
Hi.
I developed special software for remove aberration based on ImageJ library. Currently has no GUI, it's calibrated only for Fuji Finepix S100fs and all descriptions is in czech language only. But it's easy to use. Only put some images from Fuji S100fs to imgs folder and run .bat file. This software remove aberration in two steps. First, split image to RGB layers and resize it. This step dependent on focal length of fotos and it's calibrated only for S100fs. Next, find edges and desaturate colors which has specific Hue on the edges. This will be work for all cameras. Big problem is: How to decide what is aberration and what is the same color on the image. For example green fence or blue traffic mark. Difference is that aberration is small strip on the edge, but if the same color is on the bigger area, it's not aberration. But how I can fast detect size of area with the same color as aberration. Change behavior of the program you can only in source file at the moment. I think, that this program has acceptable result at the moment. But this is my first graphics application. I have no experience in this area before. HomePage: http://www.atomsoft.cz/projekty/SmartAberrationRemover/ -- Tomas Prochazka |
Free forum by Nabble | Edit this page |