Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
106 user(s) are online (81 user(s) are browsing Forums)

Members: 0
Guests: 106

more...

Support us!

Headlines

 
  Register To Post  

ALE image processing - Hints and tips
Amigans Defender
Amigans Defender


See User information
ALE is an image processing program, which takes multiple source images and combines them to remove noise etc (a process I believe is known as "stacking"). It should also be possible to use it to stitch together individual photographs into a larger panoramic view. It has a truckload of options and I'm sure there are many other things it can be coerced into doing, as it appears to be pretty powerful.

I ported it this morning and uploaded it earlier today for wider testing, as at the time I couldn't get it to work - it appeared to stop at random places, but I thought this might be me being impatient as the images I was using for testing were rather large. I have continued to try and get it working and have now managed to do so.

A sequence of five images, the first of which looks like this:
Resized Image

Were cleaned up to produce this: (the poor focus is entirely my fault)
Resized Image

So here follows a few hints:

1. Raise the task priority
Issue the command changetaskpri 1 before calling ale-bin. This was my problem. You will notice it hogs the CPU but it does work. At priority 0 it obviously doesn't get anywhere near the amount of CPU time it needs.

2. Use the following script to convert a directory full of JPEGs into a directory full of PPMs (this port of ALE is compiled only with support for PPMs)

list >t:convjpegs.tmp #?.jpg lformat="jpegtopnm %n >%n.ppm"
execute t:convjpegs.tmp
delete t
:convjpegs.tmp


The above will need NetPBM installed to work.

3. If the source file is a video, you can split it into PPMs with MPlayer and this command:

mplayer -nosound -vo pnm:outdir=/tvideo.mov


That should output the frames to T: (note the crappy UNIX naming, it won't work with proper AmigaOS paths as colons confuse MPlayer)


Please post in this thread if you have any tips or have discovered something interesting which ALE can do. If you've tried creating a panoramic view please post the result.


Edited by Chris on 2009/11/30 18:41:27
Go to top
Re: ALE image processing - Hints and tips
Amigans Defender
Amigans Defender


See User information
(The download link in the first post is now available)

Stitching together photos to create a panoramic shot works pretty well. I took the first 40 frames of a panning video and it did an excellent job of putting them together. Will try again with individual photos and bigger gaps to see if it can cope with that too.

Here is a quick'n'dirty yet useful ARexx script which joins together all the photos in the current directory (will need a bit of editing of paths and filenames etc):

/* rexx */
option results
/*
address command 'apps:mplayer/genericppc/mplayer -nosound -vo pnm:outdir=/files/testfiles/pantest 100_1361.MOV'
*/
address command 'list #?.ppm >t:filelist.tmp lformat %n'

files ""
open('flist','t:filelist.tmp','R')
do 
until eof('flist')
files files readln('flist')
end
close
('flist')

cmdline "Files:Projects/ale-0.8.11.2/ale-bin --extend " files "output.ppm"

address command 'echo >t:rxale.tmp "changetaskpri 2"'
address command 'echo >>t:rxale.tmp "' || cmdline || '"'
address command 'execute t:rxale.tmp'

Go to top
Re: ALE image processing - Hints and tips
Home away from home
Home away from home


See User information
@Chris
Interesting idea to combine several frames to remove noise/etc. Does it automatically move/rotate/scale different frames, so that they are all aligned? I assume it at least automatically moves them to find best fit, since that would also be required for making a panorama.

Author of the PortablE programming language.
Go to top
Re: ALE image processing - Hints and tips
Quite a regular
Quite a regular


See User information
@Chris


This is the type of software that could be used for planetary imaging using a webcam. The way this is usually done is take many images as an AVI file and then stack them to use noise.

Registrax (not available for Amiga) is the software normally used to do this on PCs but ALE couldwell be an option for the Amiga to do something similar.

Of course what we need are drivers for USB webcams first, without the raw data the image processing is rather limited !


Good luck with your ALE project, I hope it remains REAL ALE and not degenerate into some bland fizzy cold lager

Go to top
Re: ALE image processing - Hints and tips
Amigans Defender
Amigans Defender


See User information
@ChrisH

Quote:
Interesting idea to combine several frames to remove noise/etc. Does it automatically move/rotate/scale different frames, so that they are all aligned? I assume it at least automatically moves them to find best fit, since that would also be required for making a panorama.


Yes, it moves and rotates them. Not sure about scaling. There are loads of options, even for the alignment part:

*******************************
ALE Help Textversion 0.8.11.2
Section
Alignment
*******************************

Alignment channel options:
--
align-all       Align images using all color channels
--align-green     Align images using the green channel
--align-sum       Align images using a sum of channels [default]

Transformation options:
--
translation     Only adjust the position of images
--euclidean       Adjust the position and orientation of images [default]
--
projective      Use projective transformations.  Best qualitybut slow.

Alignment following:
--
follow          Frames align closely with their predecessor.  [default]
--
identity        Frames align closely with the original frame.

Alignment failure:
--
fail-optimal    Frames beneath threshold are aligned optimally.  [default]
--
fail-default    Frames beneath threshold keep their default alignment.

Transformation file operations:
--
trans-load <x>  Load initial transformation settings from file <x>
--
trans-save <x>  Save final transformation data in file <x>

Tunable parameters:
--
metric=x        Set the alignment error metric exponent.       (2 is default)
--
threshold=x     Minmatch thresholda perfect match is 100.  (0 is default)
--
perturb-upper=x Perturbation upper bound pixels/arclength    (14is default)
                     (
'x%' uses a fraction of the smallest image dimension.)
--
perturb-lower=x Perturbation lower bound pixels/arclength   (.125 is default)
                     (
'x%' uses a fraction of the smallest image dimension.)
--
rot-upper=x     Rotation-specific upper bound in degrees    (32.0 is default)
--
bda-mult=x      Barrel distortion adjustment multiplier      (2.0 is default)
--
bda-rate=x      Barrel distortion rate of change maximum     (8.0 is default)
--
lod-max=x       LOD scale factor is max(1, (2^floor(x))/perturb)  (-4 is def)
--
mc <x>          Statically sample ~xof available pixels     (30 is default)

Certainty-weighted alignment:
--
cw              Weight alignment error by certainty.
--
no-cw           Don't weight alignment error by certainty. [default]

Alignment weight maps:
--wm <f> <x> <y>  Use weight map image <f> at offset (<x>, <y>)

Frequency-weighted alignment:
--fl <h> <v> <a>  High-pass filters: horizontal <h>, vertical <v>, average <a>.
                     Values should fall between 0 (pass all) and 1 (pass none).
--flshow <o>      Write high-pass filtered data to file <o>.

Algorithmic alignment weighting:
--wmx <e> <r> <d> Write reference <r>, definition <d>, execute `<e> <f> <d>`,
                  read weights <r> back.

                     NOTE: since this build was not configured with
                           support for --wmx, this option is not supported.
                           To use this option, re-build with support for --wmx.

Perturbation Type [experimental]:
--perturb-output  Apply perturbations in output image coordinates. [default]
--perturb-source  Apply perturbations in source image coordinates.

Global searching:
--gs <type>       Set global search to <type>, one of:
                     local     Local alignment only
                     inner     Alignment reference image inner region
                     outer     Alignment reference image outer region
                     all       Union of inner and outer
                     central   inner if below threshold or better; else, outer.
                     defaults  '
all' if default, 'local' otherwise.  [default]
                     points    Align by control points.  Ignores gs-mo.
--gs-mo <x>       Set <x> pixel min. overlap for global search.   (67% default)
                     ('
x%' uses a fraction of the total pixel count.)

Multi-alignment:
--md <n>          Use no more than <n>-fold decomposition.       (3 is default)


@BillE

Quote:
Of course what we need are drivers for USB webcams first, without the raw data the image processing is rather limited !


True. I've been using a compact digital camera in video mode for my testing, no drivers required there. Whether that's a viable option or not, is another matter.


@Thread

There is an error in the readme, I'd just like to make clear that I did not write this, I only ported it. When I upload a newer version (with the task priorirty bug fixed and maybe ImageMagick support) I will correct the readme.

Go to top
Re: ALE image processing - Hints and tips
Just popping in
Just popping in


See User information
@Chris

Cool, I have always wanted to have a tool for OS4 which supports image stitching, I have made in the past some multiple panoramic shots which I'd like to join in a single photo. Thanks!

Varthall

Go to top
Re: ALE image processing - Hints and tips
Amigans Defender
Amigans Defender


See User information
I've finally got around to uploading a new version with ImageMagick support (and the priority bug fixed - although I'm not sure what fixed it as I haven't directly changed anything)

http://aminet.net/gfx/misc/ale.lha

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project