[GRASS5] r.wavelet

Sajith VK sajithvk at gmail.com
Tue Jul 5 00:26:59 EDT 2005


Thanks Andrea,
For the prompt and detailed reply.
I will test the module after two-three days.
I will let you know the details.
(And I may trouble you with more querries!!)

I think we need to develop some applications using
this wavelet module.(Like image fusion). People
way not require this module directly. But wavelet
transformation is a good tool for may remote sensing
analysis.

--
Sajith VK
"Freedom is not free"
On 7/4/05, Andrea Antonello <moovida at katamail.com> wrote:
> Alright, I did some check and will answer and correct myself.
> 
> > Yes, I simply included the r.wavelet folder in my raster folder and
> > everything works.
> 
> Not true, you will need a file makefile with the following in it:
> 
> include head.mk
> 
> PGM1=r.biowave.dec
> PGM2=r.owave.dec
> PGM3=r.biowave.rec
> PGM4=r.owave.rec
> OBJ1=$(OBJARCH)/biowave2.o $(OBJARCH)/biofunctions.o $(OBJARCH)/sconvolve.o
> OBJ2=$(OBJARCH)/owave2.o $(OBJARCH)/biofunctions.o $(OBJARCH)/sconvolve.o
> OBJ3=$(OBJARCH)/ibiowave2.o $(OBJARCH)/biofunctions.o $(OBJARCH)/sconvolve.o
> OBJ4=$(OBJARCH)/iowave2.o $(OBJARCH)/biofunctions.o $(OBJARCH)/sconvolve.o
> all: $(BIN)/$(PGM1) $(BIN)/$(PGM2) $(BIN)/$(PGM3) $(BIN)/$(PGM4)
> 
> $(BIN)/$(PGM1):$(OBJ1) $(GISLIB)
>  $(CC) $(LDFLAGS) -o $@ $(OBJ1) $(GISLIB) $(MATHLIB) $(XDRLIB) $(RASTERLIB)
> $(BIN)/$(PGM2):$(OBJ2) $(GISLIB)
>  $(CC) $(LDFLAGS) -o $@ $(OBJ2) $(GISLIB) $(MATHLIB) $(XDRLIB) $(RASTERLIB)
> $(BIN)/$(PGM3):$(OBJ3) $(GISLIB)
>  $(CC) $(LDFLAGS) -o $@ $(OBJ3) $(GISLIB) $(MATHLIB) $(XDRLIB) $(RASTERLIB)
> $(BIN)/$(PGM4):$(OBJ4) $(GISLIB)
>  $(CC) $(LDFLAGS) -o $@ $(OBJ4) $(GISLIB) $(MATHLIB) $(XDRLIB) $(RASTERLIB)
> $(OBJ1):biowave2.h
> $(OBJ2):biowave2.h
> $(OBJ3):biowave2.h
> $(OBJ4):biowave2.h
> $(GISLIB):
> 
> include tail.mk
> 
> 
> > Some lines of background (very fast, give me the chance :o)): the wavelet
> > filtering process creates from one map four maps of half of the resolution.
> > So every processing level takes map
> >
> > 1
> >
> > and creates four maps:
> >
> > 2_11, 2_12, 2_21, 2_22
> >
> > that have obviously same boundaries but different (half) resolution.
> > Next level takes the map of the lower resolution map
> >
> > 2_22   (the others contain the difference values in x, y and xy)
> 
> This was wrong, the lower resolution one is in the *_11, i.e. 2_11. *_22 is
> the xy diagonal direction.
> 
> 
> Alright, now the solution comes, even if it's a workaround version. Please
> take into account that when these modules were written, I was at my very
> first programming and grassprogramming experiences.
> 
> Btw, the fact is that the modules work only for floating point FCELLs, i.e.
> not for integers and not for doubles. This is for sure due to some casting
> problem I could not deal with at the time (I feel ashamed...).
> 
> The working result can be seen on 6 levels of decomposition the concave-convex
> zones of an island (twice you can guess which one :)):
> 
> http://www.hydrologis.com/testfiles/waveletsscreens/images.html
> 
> Next question will be: when will you fix this?
> I'm very busy at the moment and will not be able to fix that soon (did you
> ever go through the code of a beginning programmer?). So the only way now is
> to deal with floating point maps. Sorry for that.
> 
> Cheers,
> Andrea
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> >
> > So the boundary are the same, but when I visualize, the result is the
> > following:
> >
> > http://www.hydrologis.com/testfiles/wavelet_pbl.png
> >
> >
> > The bigger map is the third level of wavelet decomposition of the smaller
> > map. The boundaries are the same, so I can't understand why the lower
> > resolution map gets stretched.
> >
> > In the last years did something change in the raster apis, which I missed?
> >
> > Sajith, can you try and tell me if you get the same results?
> >
> > Has anyone some hint? I'm not really happy to go through some code I didn't
> > open for years if it is not really necessary.
> >
> > > Also why r.wavelet is not part of grass6 distribution?
> >
> > I guess because they seem not to work at the time :)
> > Honestly you are the second person that ask for multiresolution analysis in
> > 3 years, so I think that is why they are in the add-ons section.
> >
> > > Does it lacks something, like documentation?
> >
> > No, the manual pages were made properly and exaustive.
> >
> >
> > Hope this can be solved,
> > Cheers,
> > Andrea
> >
> > > On 7/3/05, Andrea Antonello <moovida at katamail.com> wrote:
> > > > Hi Sajith,
> > > >
> > > > >        I am planing to do some image processing based on wavelet.
> > > > > I checked the r.wavelet module in the grass addon section, but it is
> > > > > made for grass 4(?). I wish to upgrade it to the present grass
> > > > > version.
> > > >
> > > > the modules were made for the grass5 version. I got in touch only once
> > > > again with the wavelets modules in grass6, where they gave some strange
> > > > output, but at that time I had no second free to understand what it
> > > > was. Since the raster api didn't change (someone correct me if it's not
> > > > true), those modules should work out of the box.
> > > >
> > > > > I am not a grass developer now, and I dont know the changes in grass
> > > > > libraries between version 4 and 6.
> > > > > Can some one guide me on how to proceed?
> > > >
> > > > What do you mean? Compilation into the release or usage?
> > > > The man pages in the package should fullfill the second.
> > > > However for a first quick use:
> > > > r.biowave.dec input=<mapname> output=<outputname> filter1=sp02.ir
> > > > filter2=sl05.ir filterpath=<folder where the filters (sp02.ir and
> > > > sl05.ir) are with / at the end>  NumRec=3
> > > >
> > > > This will perform a 3 step wavelets decomposition.
> > > > The maps will be created and the names are selfexplanatory.
> > > >
> > > > If I remeber correct, the starting map has to be floating point, else
> > > > there will be strange results.
> > > >
> > > > Cheers,
> > > > Andrea
> > > >
> > > >
> > > >
> > > > --
> > > > _______________________________________________________________________
> > > >__ ___ HydroloGIS - Environmental Open Source Solutions
> > > > www.hydrologis.com
> > > >
> > > > Andrea Antonello
> > > > Environmental Engineer
> > > > mobile:  +393288497722
> > > >
> > > > "Let it be as much a great honour to take as to give learning,
> > > > if you want to be called wise."
> > > > Skuggsja' - The King's mirror - 1240 Reykjavik
> > > > _______________________________________________________________________
> > > >__ ___
> 
> --
> ____________________________________________________________________________
> HydroloGIS - Environmental Open Source Solutions
> www.hydrologis.com
> 
> Andrea Antonello
> Environmental Engineer
> mobile:  +393288497722
> 
> "Let it be as much a great honour to take as to give learning,
> if you want to be called wise."
> Skuggsja' - The King's mirror - 1240 Reykjavik
> ____________________________________________________________________________
> 
> 
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5
> 


-- 
Change the rules, or the rules will change you
     ---------Kumaranasan




More information about the grass-dev mailing list