Re: [GRASS-user] align large number of images in a automated way

2014-07-30 Thread Blumentrath, Stefan
Hi Miltinho,

If I understood you correctly, I think we are facing similar challenges, 
because we are planning to test our wildlife foto traps in a remote sensing 
context where we need to have a proper georeference for each image.

I assume all your images are equal, means they cover the same surface on the 
ground and are taken from the same angle and with the same camera?

Because of other obligations we have not really started the work yet, but we 
consider two alternative solutions:
A full GRASS based ortorectification: 
http://gis.cri.fmach.it/uploads/CAGEO_2011.pdf (for this one I have to talk to 
our camera operator that he provides the necessary information on fiducial 
marks, and necessary camera parameters, not sure if we can make it work)
Or (more quick and dirty) using ground control points in gdalwarp 
(http://www.gdal.org/gdalwarp.html). Probably, you may have to add the GCPs to 
the image using gdal_translate (then VRT is a recommended output format) in 
advance to gdalwarp.

Don`t know how far this work got: 
http://linfiniti.com/2010/10/automated-gcp-collection-in-quantum-gis/

In any case I would be interested in how you solved this at the end...

Cheers and good luck
Stefan


From: grass-user-boun...@lists.osgeo.org 
[mailto:grass-user-boun...@lists.osgeo.org] On Behalf Of Milton Ribeiro
Sent: 30. juli 2014 04:41
To: grass-user grass-user
Subject: [GRASS-user] align large number of images in a automated way

Dear all,

I have a large number of images that was taken using a camera in the top of a 
15 m tall tower.
Now I need to align or spatially synchronize them using same automated 
solution, because it is not feasible one by one (I have 18,000 photos).
Any hint are welcome.
best wishes

--
Miltinho - m...@rc.unesp.brmailto:m...@rc.unesp.br
Laboratório de Ecologia Espacial e Conservação - LEEC
Depto de Ecologia - UNESP - Rio Claro
Av. 24A, 1515- Bela Vista
13506-900 Rio Claro, SP, Brasil

Fone: +55 19 3526-9647 (office)  19 3526-9680 (lab)
Cel: 19 9853-3220 / 19 9853-5430

Depto Ecologia http://ib.rc.unesp.br/#!/departamentos/ecologia/
PG ECO  BIODIV 
http://ib.rc.unesp.br/#!/departamentos/ecologia/pos-graduacao-em-ecologia-e-biodiversidade/

CV 
http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true

Google citations http://scholar.google.com/citations?user=OWX_2eAJ
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] align large number of images in a automated way

2014-07-30 Thread Markus Neteler
On Wed, Jul 30, 2014 at 10:00 AM, Hamish hamish.webm...@gmail.com wrote:
 you may be interested in this earlier work, I seem to recall there was
 a FOSS4G presentation/proceedings about it too some years ago too (does
 a picture from a hill looking down on a dock with a Lake beyond jog the
 memory of anyone?).

Yes, I made that together with Ivan Michelazzi.

 http://grasswiki.osgeo.org/wiki/Orthorectification_digital_camera

Reference:

M. Neteler, D. Grasso, I. Michelazzi, L. Miori, S. Merler, and C.
Furlanello, 2005: An integrated toolbox for image registration, fusion
and classification. International Journal of Geoinformatics, 1(1), pp.
51-61
http://www.grassbook.org/neteler/papers/neteler2005_IJG_051-061_draft.pdf

cheers
Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] align large number of images in a automated way

2014-07-30 Thread G. Allegri
The only problem I see with using Hugin is the lack of orthorectification.
I suppose you must assume planar images.
I hope there will arrive enough fundings to bring bundle adjustment
development on...

giovanni
Milton wrote:
 I have a large number of images that was taken using a camera in the
 top of a 15 m tall tower. Now I need to align or spatially
 synchronize them using same automated solution, because it is not
 feasible one by one (I have 18,000 photos). Any hint are welcome.
 best wishes

(I'll second the recommendation for Hugin, it's great)
http://hugin.sourceforge.net/
http://hugin.sourceforge.net/docs/manual/Autopano-sift.html


Stefan:
 If I understood you correctly, I think we are facing similar
 challenges, because we are planning to test our wildlife foto traps
 in a remote sensing context where we need to have a proper
 georeference for each image.

 I assume all your images are equal, means they cover the same surface
 on the ground and are taken from the same angle and with the same
 camera?

 Because of other obligations we have not really started the work yet,
 but we consider two alternative solutions: A full GRASS based
 ortorectification: http://gis.cri.fmach.it/uploads/CAGEO_2011.pdf
 (for this one I have to talk to our camera operator that he provides
 the necessary information on fiducial marks, and necessary camera
 parameters, not sure if we can make it work) Or (more quick and
 dirty) using ground control points in gdalwarp
 (http://www.gdal.org/gdalwarp.html). Probably, you may have to add
 the GCPs to the image using gdal_translate (then VRT is a recommended
 output format) in advance to gdalwarp.

you may be interested in this earlier work, I seem to recall there was
a FOSS4G presentation/proceedings about it too some years ago too (does
a picture from a hill looking down on a dock with a Lake beyond jog the
memory of anyone?).

http://grass.osgeo.org/gdp/stereo-grass/index.html
http://grasswiki.osgeo.org/wiki/Image_processing#Stereo_ideas
http://grasswiki.osgeo.org/wiki/Orthorectification_digital_camera


regards,
Hamish
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] align large number of images in a automated way

2014-07-30 Thread Markus Neteler
On Wed, Jul 30, 2014 at 11:17 AM, G. Allegri gioha...@gmail.com wrote:
 The only problem I see with using Hugin is the lack of orthorectification. I
 suppose you must assume planar images.

The request is, I think, related to a stack of images (from a tower)
rather than a flight.

 I hope there will arrive enough fundings to bring bundle adjustment
 development on...

Here in FEM (http://gis.cri.fmach.it/) Stephan Turek has started to
implement bundle block adjustment during his ERASMUS stay last year.
It would be nice to expand that prototype.
However, not related to the request as far as I understand.

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] align large number of images in a automated way

2014-07-30 Thread G. Allegri

 Here in FEM (http://gis.cri.fmach.it/) Stephan Turek has started to
 implement bundle block adjustment during his ERASMUS stay last year.
 It would be nice to expand that prototype.
 However, not related to the request as far as I understand.


Sorry,
I saw that you were citing GRASS orthorectification papers, so I thought it
was a requirement.

giovanni



 Markus




-- 
Giovanni Allegri
http://about.me/giovanniallegri
Twitter: https://twitter.com/_giohappy_
blog: http://blog.spaziogis.it
GEO+ geomatica in Italia http://bit.ly/GEOplus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] align large number of images in a automated way

2014-07-30 Thread Blumentrath, Stefan
Hi again,

given that from that tower (or in our cases wildlife foto traps) exactly the 
same images are taken at different points in time (assuming cameras are mounted 
with fixed angle and so on), one could ideally use one and the same set of GCPs 
on all images...

I did not digg through our image material yet, so I cannot estimate the maximum 
shift between images, but I expect (hope) it is neglectable...

In that case orthrectification in GRASS GIS should be scriptable (should`nt 
it?). I will have a look at our images asap (though that might be some days or 
weeks).

Cheers
Stefan
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

[GRASS-user] grass7 will not display raster

2014-07-30 Thread Raphael.Viscarra-Rossel
Hello Hamish,

I installed GRASS 7 (following Markus'  hint to install GEOS frwk also).
GRASS7 and the GUI start and all seems fine until I try to display a raster map 
– it does not display.

I thought that it might be because the mapset was created in an older version 
of GRASS (6.4.2) but I started a new project and imported a raster into a new 
map set in G7 – still not displaying.  I can draw a histogram of the raster 
data but I cannot view the map.

When I start GRASS7, I get the message below, but I do not know what it means.

I use a Mac.  Will appreciate any help with this.  Thank you.

Launching wxpython GUI in the background, please wait...

GRASS 7.0.0svn (rain):~  objc[15362]: Class TSSandboxPrefs is implemented in 
both /Library/Frameworks/TSLicense.framework/Versions/A/TSLicense and 
/Library/QuickTime/Flip4Mac WMV Import.component/Contents/MacOS/Flip4Mac WMV 
Import. One of the two will be used. Which one is undefined.

objc[15362]: Class TSSandboxPrefs is implemented in both 
/Library/Frameworks/TSLicense.framework/Versions/A/TSLicense and 
/Library/QuickTime/Flip4Mac WMV Advanced.component/Contents/MacOS/Flip4Mac WMV 
Advanced. One of the two will be used. Which one is undefined.

GRASS 7.0.0svn (rain):~ 

Raphael.


From: Hamish hamish.webm...@gmail.commailto:hamish.webm...@gmail.com
Date: Wednesday, 30 July 2014 5:09 pm
To: Viscarra Rossel, Raphael (LW, Black Mountain) 
raphael.viscarra-ros...@csiro.aumailto:raphael.viscarra-ros...@csiro.au
Cc: grass-user@lists.osgeo.orgmailto:grass-user@lists.osgeo.org 
grass-user@lists.osgeo.orgmailto:grass-user@lists.osgeo.org
Subject: Re: [GRASS-user] create a common colour scale

Raphael wrote:
thank you for the response and the hints.

no worries

They are very useful as i cannot get GRASS7 to work.

what's the trouble? maybe we can help.


regards,
Hamish

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

[GRASS-user] Setting GRASS GIS GRASS_ADDON_PATH on Windows

2014-07-30 Thread m roy
Hi,

i'm trying to run a python script with GRASS 6.4 on windows,
using an osgeo4w installation and can't find where to put
the GRASS_ADDON_PATH env variable, anyone managed to
set on windows ?

thanks
  ___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] align large number of images in a automated way

2014-07-30 Thread Milton Ribeiro
Dear all,

Thanks for all your replies.
Considering the answers and comments I complement my request:
1. I have no interest on the spatial coordinates, only need align the
images (so I can use a local coordinate)
2. Although the camera is fixed, there are some variability on the image
positions, the platn canopy change positions etc (and we did some fix on
the camera support, so part of the imagens have a diffent field of view -
but we can bypass this aligning using two or three packages of images)
3. This is part of our E-phenology project, that means that we have
interest on phenological changes thoughout of time
4. I will define regions of interest on the subset of images (let say part
of a canopy) and analyze the greeness or other vegetation change index, so
is important have all the package of images well aligned.
5. Unfortunatelly, as I have 18,000 images (and increasing), collect ground
control point is not the solution :-(

I will carefully check your suggestions, but if you have other hints, this
will be very welcome

milton


2014-07-30 8:03 GMT-03:00 Blumentrath, Stefan stefan.blumentr...@nina.no:

  Hi again,

 given that from that tower (or in our cases wildlife foto traps) exactly
 the same images are taken at different points in time (assuming cameras are
 mounted with fixed angle and so on), one could ideally use one and the same
 set of GCPs on all images...

 I did not digg through our image material yet, so I cannot estimate the
 maximum shift between images, but I expect (hope) it is neglectable...

 In that case orthrectification in GRASS GIS should be scriptable
 (should`nt it?). I will have a look at our images asap (though that might
 be some days or weeks).

 Cheers
 Stefan

 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user




-- 
Miltinho - m...@rc.unesp.br
Laboratório de Ecologia Espacial e Conservação - LEEC
Depto de Ecologia - UNESP - Rio Claro
Av. 24A, 1515- Bela Vista
13506-900 Rio Claro, SP, Brasil

Fone: +55 19 3526-9647 (office)  19 3526-9680 (lab)
Cel: 19 9853-3220 / 19 9853-5430

Depto Ecologia http://ib.rc.unesp.br/#!/departamentos/ecologia/
PG ECO  BIODIV
http://ib.rc.unesp.br/#!/departamentos/ecologia/pos-graduacao-em-ecologia-e-biodiversidade/

CV
http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true

Google citations http://scholar.google.com/citations?user=OWX_2eAJ
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] align large number of images in a automated way

2014-07-30 Thread Markus Neteler
Dear Milton,

I made a quick test with the sample data you sent to me:

autopano-sift-c output.pto dir_2014_002_17_1.jpg dir_2014_002_16_7.jpg
[...]
  555 keypoints found
[...]
Filtering... (dir_2014_002_17_1.jpg, dir_2014_002_16_7.jpg)
   A. Join Filtration: 32 to 32
   B. Score Filtration: 32 to 25
Filtered partition [0,1] from 32 matches down to 25


cat output.pto
# Hugin project file generated by APSCpp
[...]
# automatically generated control points
c n0 N1 x290.400812 y143.672441 X289.377092 Y142.525139 t0
c n0 N1 x566.209025 y383.642656 X566.343984 Y383.440512 t0
c n0 N1 x321.360169 y120.632838 X321.409832 Y120.057093 t0
c n0 N1 x45.026134 y21.912848 X43.642776 Y22.815530 t0
c n0 N1 x299.155503 y122.350252 X298.325028 Y122.493041 t0
[...]
c n0 N1 x377.501999 y142.803118 X372.855780 Y145.767751 t0

So, it easily find a lot of common points (runtime of autopano-sift-c
is 0.72 seconds on my office Linux PC). In a scripted approach you
could match the 18,000 images against a master image or the like, then
convert the resulting output.pto files into a text file structure
readable by i.rectify.

Hope this helps,
Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] i.rectify (or gdalwarp -off topic)

2014-07-30 Thread Milton Ribeiro
Dear all,

sorry to post this issue here, but maybe some of you can help me.

Following Markus Neteler (and other) suggestioins, I was able to
automatically generate a ground control point file for a large set of
images.

Now I have (at least) two directions.
1. rectify the image using i.rectify
2. use gdalwarp out of grass

In both ways I face the same issues: a) how can I input my text file for a
certain image and b) what is the proper format that I need to follow when
preparing the file (for both i.rectify and gdalwarp)?

Detail: the images are JPG fotos taken using a fixed camera in the top of a
tower, so the images are nearly the same scene.

Thanks a million
-- 
Miltinho - m...@rc.unesp.br
Laboratório de Ecologia Espacial e Conservação - LEEC
Depto de Ecologia - UNESP - Rio Claro
Av. 24A, 1515- Bela Vista
13506-900 Rio Claro, SP, Brasil

Fone: +55 19 3526-9647 (office)  19 3526-9680 (lab)
Cel: 19 9853-3220 / 19 9853-5430

Depto Ecologia http://ib.rc.unesp.br/#!/departamentos/ecologia/
PG ECO  BIODIV
http://ib.rc.unesp.br/#!/departamentos/ecologia/pos-graduacao-em-ecologia-e-biodiversidade/

CV
http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true

Google citations http://scholar.google.com/citations?user=OWX_2eAJ
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] grass7 will not display raster

2014-07-30 Thread Michael Barton
Does a vector map display? Are you looking at some of the demo data to make 
sure it’s not your map?

Michael
__
C. Michael Barton
Director, Center for Social Dynamics  Complexity
Professor of Anthropology, School of Human Evolution  Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University
Tempe, AZ  85287-2402
USA

voice:  480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax:  480-965-7671(SHESC), 480-727-0709 (CSDC)
www:  http://csdc.asu.edu, http://shesc.asu.edu
http://www.public.asu.edu/~cmbarton

On Jul 30, 2014, at 12:00 PM, 
grass-user-requ...@lists.osgeo.orgmailto:grass-user-requ...@lists.osgeo.org 
grass-user-requ...@lists.osgeo.orgmailto:grass-user-requ...@lists.osgeo.org 
wrote:

From: 
raphael.viscarra-ros...@csiro.aumailto:raphael.viscarra-ros...@csiro.au
Subject: [GRASS-user] grass7 will not display raster
Date: July 30, 2014 at 4:30:31 AM MST
To: hamish.webm...@gmail.commailto:hamish.webm...@gmail.com
Cc: grass-user@lists.osgeo.orgmailto:grass-user@lists.osgeo.org


Hello Hamish,

I installed GRASS 7 (following Markus'  hint to install GEOS frwk also).
GRASS7 and the GUI start and all seems fine until I try to display a raster map 
– it does not display.

I thought that it might be because the mapset was created in an older version 
of GRASS (6.4.2) but I started a new project and imported a raster into a new 
map set in G7 – still not displaying.  I can draw a histogram of the raster 
data but I cannot view the map.

When I start GRASS7, I get the message below, but I do not know what it means.

I use a Mac.  Will appreciate any help with this.  Thank you.

Launching wxpython GUI in the background, please wait...
GRASS 7.0.0svn (rain):~  objc[15362]: Class TSSandboxPrefs is implemented in 
both /Library/Frameworks/TSLicense.framework/Versions/A/TSLicense and 
/Library/QuickTime/Flip4Mac WMV Import.component/Contents/MacOS/Flip4Mac WMV 
Import. One of the two will be used. Which one is undefined.
objc[15362]: Class TSSandboxPrefs is implemented in both 
/Library/Frameworks/TSLicense.framework/Versions/A/TSLicense and 
/Library/QuickTime/Flip4Mac WMV Advanced.component/Contents/MacOS/Flip4Mac WMV 
Advanced. One of the two will be used. Which one is undefined.
GRASS 7.0.0svn (rain):~ 

Raphael.


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] i.rectify (or gdalwarp -off topic)

2014-07-30 Thread Hamish
Milton wrote:
 Following Markus Neteler (and other) suggestioins, I was able to
 automatically generate a ground control point file for a large set of
 images.
 
 Now I have (at least) two directions.
 1. rectify the image using i.rectify
 2. use gdalwarp out of grass
 
 In both ways I face the same issues: a) how can I input my text file
 for a certain image and b) what is the proper format that I need to
 follow when preparing the file (for both i.rectify and gdalwarp)?
 
 Detail: the images are JPG fotos taken using a fixed camera in the
 top of a tower, so the images are nearly the same scene.

Hi,

If are familair with Bourne shell scripting, you might have a look in the 
grass6 addons SVN for i.warp and i.points.reproj scripts.

(i.warp is a bit of a mess, but uses gdalwarp with grass's POINTS gcp file)

the grass POINTS gcp file is pretty easy format, 

#   image  target   status
#east   northeast   north   (1=ok)
#
 2.537267   10.230953  1393516.34  4902494.781
 8.038078   10.219225  1419326.28  4903305.401
13.531500   10.212226  1445136.43  4904007.831
 8.0297182.291376  1420414.87  4866269.911
 2.5310902.302488  1394760.64  4865459.671
19.005416   10.198488  1470946.75  4904602.121
18.9879682.271928  1471724.12  4867566.031
13.5192342.281374  1446060.02  4867342.381
 6.186646   14.579820  1410021.804000  4923820.6670001
 5.233682   14.892164  1403912.826000  4925688.7450000
 4.728343   14.134303  1403217.899000  4921427.9140001
 8.716253   13.454576  1421998.543000  4918833.2690001



regards,
Hamish
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] align large number of images in a automated way

2014-07-30 Thread Terry Duell
On Thu, 31 Jul 2014 01:15:54 +1000, Markus Neteler nete...@osgeo.org  
wrote:



Dear Milton,

I made a quick test with the sample data you sent to me:

autopano-sift-c output.pto dir_2014_002_17_1.jpg dir_2014_002_16_7.jpg
[...]
  555 keypoints found
[...]
Filtering... (dir_2014_002_17_1.jpg, dir_2014_002_16_7.jpg)
   A. Join Filtration: 32 to 32
   B. Score Filtration: 32 to 25
Filtered partition [0,1] from 32 matches down to 25


cat output.pto
# Hugin project file generated by APSCpp
[...]
# automatically generated control points
c n0 N1 x290.400812 y143.672441 X289.377092 Y142.525139 t0
c n0 N1 x566.209025 y383.642656 X566.343984 Y383.440512 t0
c n0 N1 x321.360169 y120.632838 X321.409832 Y120.057093 t0
c n0 N1 x45.026134 y21.912848 X43.642776 Y22.815530 t0
c n0 N1 x299.155503 y122.350252 X298.325028 Y122.493041 t0
[...]
c n0 N1 x377.501999 y142.803118 X372.855780 Y145.767751 t0

So, it easily find a lot of common points (runtime of autopano-sift-c
is 0.72 seconds on my office Linux PC). In a scripted approach you
could match the 18,000 images against a master image or the like, then
convert the resulting output.pto files into a text file structure
readable by i.rectify.



I have run Milton's test images through a script which calls a number of  
hugin command line programs to generate control points, optimise and spit  
out remapped images. It seems to work quite well, with a mean error of 0.1  
pix and max error of 0.3 pix.


Cheers,
--
Regards,
Terry Duell
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] align large number of images in a automated way

2014-07-30 Thread Jed
Milton Cezar Ribeiro wrote
 5. Unfortunatelly, as I have 18,000 images (and increasing), collect
 ground
 control point is not the solution

That's only 12.5 minutes of video at 24 fps and the requirements you've
described sound like a pretty typical camera stabilization problem. Why not
take a look at camera tracking/stabilization software?

 In most cases such software will offer a high level of automation, however
more importantly, at least from my perspective, they will also provide a
good UI that will help you diagnose problems when the optimization process
eventually goes off the rails. Something that you won't have if you opt for
a completely command line solution.

If you're looking for an open-source solution Blender has a decent tracker.
The biggest feature it is probably missing for your application is being
able to use ground control points in addition to image points. Most of the
other commercial options do provide this feature, which would give you more
reliable and accurate solves.

Best,



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/align-large-number-of-images-in-a-automated-way-tp5154069p5154296.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user