Handling NULL borders when using ossimFeatherMosaic

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Handling NULL borders when using ossimFeatherMosaic

GinBijn
I have two imagery scenes, already orthorectified, that I want to combine using the ossimFeatherMosaic combiner. My problem is that image B (see sketch) has an irregular shape resulting in a lot of null pixels (with a value of zero "0"). When I combine the two the result is a a sharp border.

I suspect this is because the ossimFeatherMosaic fades the image from its center towards the border.
What is the correct way  of handling these null pixels to get a truly feathered mosaic?

- working on W7x64 using binaries
- Command used: ossim-orthoigen --histmatch perfect.tif --combiner-type ossimFeatherMosaic A.tif B.tif output.tif

Reply | Threaded
Open this post in threaded view
|

Re: Handling NULL borders when using ossimFeatherMosaic

Oscar Kramer

I would need to look at your output to tell what's happening. Though I believe your problem is the fact that the feather mosaic uses the bounding image rectangle only, and feathers in from that edge. Since your valid image for B starts well in from B's edge, the feather mosaic is simply feathering the null pixels (which means output is all A) until it hits a valid B pixel, which by then, the feathering is weighting B 100% and thus the hard edge.

My recommendation is to clip B into two rectangles using:

    ossim-orthoigen --cut-bbox-ll  <minLat1> <minLon1> <maxLat1> <maxLon1> <B.img> <B1.img>
    ossim-orthoigen --cut-bbox-ll  <minLat2> <minLon2> <maxLat2> <maxLon2> <B.img> <B2.img>

And then feather mosaic A, B1 and B2.

-Oscar

From: Ginny Bijnaar <[hidden email]>
To: Oscar Kramer <[hidden email]>
Sent: Tuesday, March 10, 2015 2:25 PM
Subject: RE: [OSSIM] Handling NULL borders when using ossimFeatherMosaic

Apologies if I was unclear. I hope this update helps. The green represents the valid imagery, black are null pixels while red represents the bounding rectangles (white is just the background here). The images overlap as shown on the right side.  

Ginny Bijnaar Bsc
Paramaribo, Suriname
(+597) 8522703





Date: Tue, 10 Mar 2015 17:26:53 +0000
From: [hidden email]
To: [hidden email]
Subject: Re: [OSSIM] Handling NULL borders when using ossimFeatherMosaic

I don't understand your drawing. What is the black, green and white? Does A overlap B? What are the image bounding rects (including null pixels)?

-Oscar


From: GinBijn <[hidden email]>
To: [hidden email]
Sent: Tuesday, March 10, 2015 1:07 PM
Subject: [OSSIM] Handling NULL borders when using ossimFeatherMosaic

I have two imagery scenes, already orthorectified, that I want to combine
using the ossimFeatherMosaic combiner. My problem is that image B (see
sketch) has an irregular shape resulting in a lot of null pixels (with a
value of zero "0"). When I combine the two the result is a a sharp border.

I suspect this is because the ossimFeatherMosaic fades the image from its
center towards the border.
What is the correct way  of handling these null pixels to get a truly
feathered mosaic?

- working on W7x64 using binaries
- Command used: ossim-orthoigen --histmatch perfect.tif --combiner-type
ossimFeatherMosaic A.tif B.tif output.tif

<http://osgeo-org.1560.x6.nabble.com/file/n5192607/null_border.png>



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Handling-NULL-borders-when-using-ossimFeatherMosaic-tp5192607.html
Sent from the Ossim-developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer





------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
Reply | Threaded
Open this post in threaded view
|

Re: Handling NULL borders when using ossimFeatherMosaic

David Burken
In reply to this post by GinBijn
Hi,

I'm not sure how you can feather that when there's no overlap.  What happens when you take the feather out and just do the histo match?

Dave



From: "GinBijn" <[hidden email]>
To: [hidden email]
Sent: Tuesday, March 10, 2015 1:07:06 PM
Subject: [OSSIM] Handling NULL borders when using ossimFeatherMosaic

I have two imagery scenes, already orthorectified, that I want to combine
using the ossimFeatherMosaic combiner. My problem is that image B (see
sketch) has an irregular shape resulting in a lot of null pixels (with a
value of zero "0"). When I combine the two the result is a a sharp border.

I suspect this is because the ossimFeatherMosaic fades the image from its
center towards the border.
What is the correct way  of handling these null pixels to get a truly
feathered mosaic?

- working on W7x64 using binaries
- Command used: ossim-orthoigen --histmatch perfect.tif --combiner-type
ossimFeatherMosaic A.tif B.tif output.tif

<http://osgeo-org.1560.x6.nabble.com/file/n5192607/null_border.png>



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Handling-NULL-borders-when-using-ossimFeatherMosaic-tp5192607.html
Sent from the Ossim-developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
Reply | Threaded
Open this post in threaded view
|

Re: Handling NULL borders when using ossimFeatherMosaic

GinBijn
Hi Dave,

My apologies as my first image is not clear enough. I'm adding a new sketch that should explain better
Green are the two images, black are null pixels and red are the bounding boxes.


There is overlap between the images as you can see in the right part of the sketch. I have split up image B using gdal to minimize the null pixels. The feathering seems to be okay now, but I noticed some blurry details at the overlap boundary. I can't imagine there being that much shift since I used an RPC to ortho.

Someone suggested me playing around with the feathering so that it uses the footprint shapefile instead of the bounding box, but I am not that adventurous.

So basically I want the null pixels to be ignored while feathering. I was also looking to see if I could set a feathering distance or a cutline of some sort. Because I noticed many of my scenes don't have straight borders and this causes artifacts at the  feathered seams.

If you have anymore suggestion, they are welcome.
Reply | Threaded
Open this post in threaded view
|

Re: Handling NULL borders when using ossimFeatherMosaic

David Burken
Are you sure the "null" pixels are correct?  Just wondering if there are artifacts in the null area, e.g. '1's instead of zeroes? (assuming unsigned integer data).  That's all I can think of.


From: "GinBijn" <[hidden email]>
To: [hidden email]
Sent: Monday, March 16, 2015 1:55:40 PM
Subject: Re: [OSSIM] Handling NULL borders when using ossimFeatherMosaic

Hi Dave,

My apologies as my first image is not clear enough. I'm adding a new sketch
that should explain better
Green are the two images, black are null pixels and red are the bounding
boxes.
<http://osgeo-org.1560.x6.nabble.com/file/n5193675/null_border.png>

There is overlap between the images as you can see in the right part of the
sketch. I have split up image B using gdal to minimize the null pixels. The
feathering seems to be okay now, but I noticed some blurry details at the
overlap boundary. I can't imagine there being that much shift since I used
an RPC to ortho.

Someone suggested me playing around with the feathering so that it uses the
footprint shapefile instead of the bounding box, but I am not that
adventurous.

So basically I want the null pixels to be ignored while feathering. I was
also looking to see if I could set a feathering distance or a cutline of
some sort. Because I noticed many of my scenes don't have straight borders
and this causes artifacts at the  feathered seams.

If you have anymore suggestion, they are welcome.



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Handling-NULL-borders-when-using-ossimFeatherMosaic-tp5192607p5193675.html
Sent from the Ossim-developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer