From: Garrett P. <gc...@ma...> - 2011-04-26 15:10:11
|
Hello Brent: Yes there is a way for the sofware to compensate. I just have not exposed the api to set your image rect for the ossimRpcSolver typically converts a sensor image into an RPC model. I can actually expose that as part of API to force a rectangle to be used for scale and offset positioning. The way they are using it is to give a batch of values so we need to also supply a rectangle argument as an optional argument and it should fix the shift. Take care Garrett On Apr 26, 2011, at 7:38 AM, Brent Fraser wrote: > Hey Garrett, > > The elevation on/off option is good to know. As for the model generation, I think it would be common that the user would not have any naturally occurring GCPs on the four corners of the image; I wonder if there is a way the software could compensate for that (generate four "artificial" GCPs)? Hmmm, height estimation could be a problem... > > Thanks! > Best Regards, > Brent Fraser > > On 4/26/2011 8:14 AM, Garrett Potts wrote: >> >> Hello Brent: >> >> Looking at the GCP's used it is in the calculation of the RPC. One restriction in the model generation is the offset and scale of line sample. The GCP's he has are interior and this will also cause a huge shift for the points going in are outside that bounds and so an invalid center offset is being calculated. >> >> >> I would set a GCP at the corners and see what you get. >> >> Also, there is an ossimRpcProjection that allows one to turn off elevation if the original model did not use elevation to calculate the model. >> >> >> Take care >> >> Garrett >> >> On Apr 26, 2011, at 7:05 AM, Brent Fraser wrote: >> >>> Chris, >>> >>> As far as I know, gdalwarp will use only a single value (0?) for height when using RPCs to rectify an image. so if the geographic area imaged has a lot of relief, the resulting ortho image may not be too accurate. Orthoigen will access DEMs to produce a better result. On the other hand I see that all of your GCPs have an elevation of 0, so if ossim-orthoigen does not have a DEM to use, the two programs should produce the same result. >>> >>> The problem may be in the RPC calculation... >>> Best Regards, >>> Brent Fraser >>> >>> On 4/26/2011 7:12 AM, Goo Creations wrote: >>>> >>>> Hi Garrett >>>> >>>> Sorry about this back-and-forth thing. I'm trying now for weeks, and I can't manage to get it working. >>>> >>>> I've uploaded the test stuff to: >>>> http://www.foxhat.org/test.tar.gz >>>> OR >>>> https://rapidshare.com/files/459272465/test.tar.gz >>>> >>>> This example uses OTB wrappers for the RPC calculations. To compile: >>>> ccmake . >>>> make >>>> ./rpc >>>> >>>> The raw.tif will be used as input image, the GCPs are in gcps.points.gcp. >>>> Running ./rpc will use these files to create RPC.txt and raw.geom >>>> The data from RPC.txt was then copied to raw.RPB (since gdal requires a RPB file for the coeffcients) >>>> >>>> Then I used the following to apply the RPCs: >>>> gdalwarp -wo "METHODE=RPC" -rpc raw.tif out.tif >>>> >>>> And: >>>> ossim-orthoigen --utm raw.tif out.tif >>>> >>>> Both of them result (more-or-less) in the same strange warping. >>>> >>>> The GCPs were carefully selected by hand, all evenly distributed over the entire image, with one GCP in (or near) each corner. >>>> >>>> I'm using Ossim version 1.8.6 >>>> >>>> >>>> Thank you Garrett for all the time and effort!! >>>> >>>> Chris >>>> >>>> >>>> >>>> On Tue, Apr 26, 2011 at 2:21 PM, Garrett Potts <gc...@ma...> wrote: >>>> Hello Chris: >>>> >>>> This going back and forth doesn't seem to be working. What I think will be best is if we can have 1 test image and the process you are using to create the RPC model. I will then modify it to calls directly into the ossim core engine that we have. I am not sure what version of OSSIM you are using, ... etc. It's best for us to do a test and then give you the result. >>>> >>>> >>>> Take care >>>> >>>> Garrett >>>> >>>> On Apr 26, 2011, at 5:12 AM, Goo Creations wrote: >>>> >>>>> Hi all >>>>> >>>>> I've used OSSIM to calculate the RPCs, based on a number of GCPs (using EstimateRPCSensorModelExample.cxx). >>>>> I've then copied all the data to an RPB file and used GDAL to orthorectify the image (gdalwarp -wo "METHOD=RPC" -rpc raw.tif ortho.tif). >>>>> I've attached the RPC file calculated by OSSIM, the RPB file I've created and a jpg from the output image. >>>>> The image is strangely warped, and I don't know why. >>>>> >>>>> I've done the same process with "QuickBird: Standard Satellite Imagery" available at http://www.digitalglobe.com/index.php/70/Product+Samples. >>>>> This image orthorectified "perfectly", without any warping. >>>>> >>>>> Hence I believe that the RPCs calculated by OSSIM might not be 100% accurate, or maybe I'm wrong. Does anyone know why this warping occurred? Is there any other software I can use to test if the RPCs are correct? >>>>> >>>>> Thanks >>>>> Chris >>>>> <RPC.txt><raw.RPB><ortho2.jpg>------------------------------------------------------------------------------ >>>>> WhatsUp Gold - Download Free Network Management Software >>>>> The most intuitive, comprehensive, and cost-effective network >>>>> management toolset available today. Delivers lowest initial >>>>> acquisition cost and overall TCO of any competing solution. >>>>> http://p.sf.net/sfu/whatsupgold-sd_______________________________________________ >>>>> www.ossim.org >>>>> Ossim-developer mailing list >>>>> Oss...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/ossim-developer >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> WhatsUp Gold - Download Free Network Management Software >>>> The most intuitive, comprehensive, and cost-effective network >>>> management toolset available today. Delivers lowest initial >>>> acquisition cost and overall TCO of any competing solution. >>>> http://p.sf.net/sfu/whatsupgold-sd >>>> _______________________________________________ >>>> www.ossim.org >>>> Ossim-developer mailing list >>>> Oss...@li... >>>> https://lists.sourceforge.net/lists/listinfo/ossim-developer >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> WhatsUp Gold - Download Free Network Management Software >>>> The most intuitive, comprehensive, and cost-effective network >>>> management toolset available today. Delivers lowest initial >>>> acquisition cost and overall TCO of any competing solution. >>>> http://p.sf.net/sfu/whatsupgold-sd >>>> >>>> _______________________________________________ >>>> www.ossim.org >>>> Ossim-developer mailing list >>>> Oss...@li... >>>> https://lists.sourceforge.net/lists/listinfo/ossim-developer >>> ------------------------------------------------------------------------------ >>> WhatsUp Gold - Download Free Network Management Software >>> The most intuitive, comprehensive, and cost-effective network >>> management toolset available today. Delivers lowest initial >>> acquisition cost and overall TCO of any competing solution. >>> http://p.sf.net/sfu/whatsupgold-sd_______________________________________________ >>> www.ossim.org >>> Ossim-developer mailing list >>> Oss...@li... >>> https://lists.sourceforge.net/lists/listinfo/ossim-developer >> >> >> ------------------------------------------------------------------------------ >> WhatsUp Gold - Download Free Network Management Software >> The most intuitive, comprehensive, and cost-effective network >> management toolset available today. Delivers lowest initial >> acquisition cost and overall TCO of any competing solution. >> http://p.sf.net/sfu/whatsupgold-sd >> >> _______________________________________________ >> www.ossim.org >> Ossim-developer mailing list >> Oss...@li... >> https://lists.sourceforge.net/lists/listinfo/ossim-developer > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd_______________________________________________ > www.ossim.org > Ossim-developer mailing list > Oss...@li... > https://lists.sourceforge.net/lists/listinfo/ossim-developer |