Hi David,

osgdem uses GDAL to do image reading and reprojection.  Its the
reprojection step that is the problematic one here, and stems from
projection producing a black region around the image, osgdem tries to
account for this by ignore all pure black pixels.  If GDAL is
returning some of images an not pure black due to sampling then these
pixels won't be rejected.

In the rewrite of VPB I am considering doing reprojection using OpenGL
and use an alpha channel to manage the boundary regions.
Alternatively it might be possible to promote an RGB source image to
RGBA and then get GDAL to reproject and then blend using the alpha
channel.

Robert.

On 7/11/07, Riepl, David M <[EMAIL PROTECTED]> wrote:
Thom/All,
I mentioned in my email, that I have verified in several viewers that
the black stayed pure black after the reprojection step of GDAL.  None
of the pixels are even near to black as my sample is in a very
desert-like area.  Are you suggesting something later in the process
that is caused by osgdem?  I don't even know, is osgdem somehow running
GDAL as a sub-process?


David Riepl
Visualization IG\DB Team
>Training Systems & Services
[EMAIL PROTECTED]
314.777.4741

-----Original Message-----
From: Decarlo, Thomas R. (LARC-B702)[NCI INFORMATION SYSTEMS]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 11, 2007 1:54 PM
To: osg users
Subject: RE: [osg-users] Black seams visible in osgdem output

David,
Those black lines are probably the result of the resampling step. GDAL
(and hence Osgdem) will, by default, consider the black borders around
the images to be the background color and will ignore them when
mosaicing the textures. However, when using the cubic spline the black
background pixels immediately adjacent to the non-black image pixels can
be blended with the image pixels and become a non-black color. The width
of the non-black border pixels will depend on the size of the cubic
kernel.

To avoid the blending, try either
- using nearest neighbor resampling.
- use the cubic spline resample but then re-mask the output to trim off
the edges of the output images that might be blended.

HTH,
Thom
--
Thom DeCarlo          mailto:[EMAIL PROTECTED]
Sr. S/W Eng, VisSim   -- NASA LaRC AvSP --   v:757-224-4089

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Riepl, David
M
Sent: Wednesday, July 11, 2007 2:41 PM
To: osg-users@openscenegraph.net
Subject: [osg-users] Black seams visible in osgdem output

All,
When I make a 2-D Map from satellite imagery and let it generate the
maximum number of LODs required to reach the max resolution, I always
see black seams/stripes/borders of my images used during the OSGDEM
process.
Here is my normal approach:
I start with a folder of imagery...as an example let's say I have 12
geocells (1deg lat/1 deg long each) of imagery.
Using gdalwarp (from FWTools), I will reproject all the satellite
imagery from Geographic Lat/Long to my output projection of choice
(usually TM, UTM or LCC).
I use cubic spline resampling and output GeoTIFFs.
I used to think this is where my problem lay, but I can open up the
reprojected imagery in a viewer (like Imagine or GlobalMapper) and I can
clearly see that the black edges around the terrain stayed pure black
(0,0,0) after the reprojection.  I can also verify that there is overlap
between the images (3 pixels in my current case).
So then I run osgdem on my folder of reprojected GeoTIFs with a command
like this:
Osgdem -t Y:\Test_10m_Reprojected -o test_sat_2d.ive -l 99 Most of the
time the black seam does not become apparent/visible until I zoom into
the highest LOD using the osgviewer.

I am using osgdem from OSG1.2 on WinXP PC.
HELP!

David Riepl
Visualization IG\DB Team
> Training Systems & Services
[EMAIL PROTECTED]
314.777.4741

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to