convert from 11 bits per pixel to 8 bits per pixel

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

convert from 11 bits per pixel to 8 bits per pixel

James E. Hopper-2
I have an image that uses 11 bits per pixel and looking at the histogram, the values in the file are in the top 2 or 3 bits.  The result of this is that if i use scalerRemapper to convert to 8 bits/pixel i get and image with most of the pixels black.  i can do a histogram remap manually to the image before moving it to 8 bits/pixel and get a decent image.  Would like to do this automatically.  is there any support in ossim to optimize the histogram for the eight bits/pixel output automatically?

Thanks jim


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
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: convert from 11 bits per pixel to 8 bits per pixel

DBurken@Radiantblue.com
Jim,

$ ossim-chipper --histogram-op auto-minmax --op ortho --output-radiometry U8 <in_file> <out_file>

That will stretch then remap.  Not sure if that's what you wanted...

See:
https://trac.osgeo.org/ossim/wiki/ossim-chipper

Usage also has a bunch of examples.

Dave


On 03/03/2016 01:20 PM, jim hopper wrote:
I have an image that uses 11 bits per pixel and looking at the histogram, the values in the file are in the top 2 or 3 bits.  The result of this is that if i use scalerRemapper to convert to 8 bits/pixel i get and image with most of the pixels black.  i can do a histogram remap manually to the image before moving it to 8 bits/pixel and get a decent image.  Would like to do this automatically.  is there any support in ossim to optimize the histogram for the eight bits/pixel output automatically?

Thanks jim



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
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: convert from 11 bits per pixel to 8 bits per pixel

James E. Hopper-2
Thanks, tried it, didn't seem to work.  let me expand on what i am doing i have an image thats 8 bands, with 11 bits per pixel).  i want to pull out the RGB bands (which i can find they are bands 2, 3, 5 and optimize the histogram for that.  i am trying now to use ice to copy out the three bands, then i will retry chipper and see if that helps.  i don't see anything in the options that looks like i can choose the bands to work with?

thanks jim


On Thu, Mar 3, 2016 at 1:30 PM, [hidden email] <[hidden email]> wrote:
Jim,

$ ossim-chipper --histogram-op auto-minmax --op ortho --output-radiometry U8 <in_file> <out_file>

That will stretch then remap.  Not sure if that's what you wanted...

See:
https://trac.osgeo.org/ossim/wiki/ossim-chipper

Usage also has a bunch of examples.

Dave


On 03/03/2016 01:20 PM, jim hopper wrote:
I have an image that uses 11 bits per pixel and looking at the histogram, the values in the file are in the top 2 or 3 bits.  The result of this is that if i use scalerRemapper to convert to 8 bits/pixel i get and image with most of the pixels black.  i can do a histogram remap manually to the image before moving it to 8 bits/pixel and get a decent image.  Would like to do this automatically.  is there any support in ossim to optimize the histogram for the eight bits/pixel output automatically?

Thanks jim




------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
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: convert from 11 bits per pixel to 8 bits per pixel

James E. Hopper-2
Ok, i did this

ossim-icp nitf_block_band_separate -b 2,3,5 08JUN15WV031300015JUN08174404-M1BS-500339281010_01_P001_________GA_E0AAAAAAKAAF0.NTF test_nitf.ntf
ossim-preproc -o --ch test_nitf.ntf
ossim-chipper  --histogram-op auto-minmax --op ortho --output-radiometry U8 test_nitf.ntf test_out.nitf


this produced an RGB image with a 8 bits per pixel that was fairy close, probably as close as we can get without manual intervention.

I will look at the chipper code to see how i can add that into our code.

Thanks a Lot!
 jim


On Thu, Mar 3, 2016 at 2:28 PM, jim hopper <[hidden email]> wrote:
Thanks, tried it, didn't seem to work.  let me expand on what i am doing i have an image thats 8 bands, with 11 bits per pixel).  i want to pull out the RGB bands (which i can find they are bands 2, 3, 5 and optimize the histogram for that.  i am trying now to use ice to copy out the three bands, then i will retry chipper and see if that helps.  i don't see anything in the options that looks like i can choose the bands to work with?

thanks jim


On Thu, Mar 3, 2016 at 1:30 PM, [hidden email] <[hidden email]> wrote:
Jim,

$ ossim-chipper --histogram-op auto-minmax --op ortho --output-radiometry U8 <in_file> <out_file>

That will stretch then remap.  Not sure if that's what you wanted...

See:
https://trac.osgeo.org/ossim/wiki/ossim-chipper

Usage also has a bunch of examples.

Dave


On 03/03/2016 01:20 PM, jim hopper wrote:
I have an image that uses 11 bits per pixel and looking at the histogram, the values in the file are in the top 2 or 3 bits.  The result of this is that if i use scalerRemapper to convert to 8 bits/pixel i get and image with most of the pixels black.  i can do a histogram remap manually to the image before moving it to 8 bits/pixel and get a decent image.  Would like to do this automatically.  is there any support in ossim to optimize the histogram for the eight bits/pixel output automatically?

Thanks jim





------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
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: convert from 11 bits per pixel to 8 bits per pixel

James E. Hopper-2
by the way Dave the class ossimChipperUtil seems to have a cut and past error in its header.  looks like this header might be from another class?  see below:

/**
 * @brief ossimChipperUtil class.
 *
 * This is a utility class to orthorectify imagery with an added slant toward
 * doing digital elevation model(DEM) operations.
 *
 * See the ossim-dem application for a code usage example.
 *
 * @note Almost all methods use throw for stack unwinding.  This is not in
 * method declarations to alleviate build errors on windows.  Sorry...
 *
 * @note "bumpshade" and "hillshade" intermixed throughout.  The class to do
 * a hillshade is the ossimBumpShadeTileSource.
 */


On Thu, Mar 3, 2016 at 2:39 PM, jim hopper <[hidden email]> wrote:
Ok, i did this

ossim-icp nitf_block_band_separate -b 2,3,5 08JUN15WV031300015JUN08174404-M1BS-500339281010_01_P001_________GA_E0AAAAAAKAAF0.NTF test_nitf.ntf
ossim-preproc -o --ch test_nitf.ntf
ossim-chipper  --histogram-op auto-minmax --op ortho --output-radiometry U8 test_nitf.ntf test_out.nitf


this produced an RGB image with a 8 bits per pixel that was fairy close, probably as close as we can get without manual intervention.

I will look at the chipper code to see how i can add that into our code.

Thanks a Lot!
 jim


On Thu, Mar 3, 2016 at 2:28 PM, jim hopper <[hidden email]> wrote:
Thanks, tried it, didn't seem to work.  let me expand on what i am doing i have an image thats 8 bands, with 11 bits per pixel).  i want to pull out the RGB bands (which i can find they are bands 2, 3, 5 and optimize the histogram for that.  i am trying now to use ice to copy out the three bands, then i will retry chipper and see if that helps.  i don't see anything in the options that looks like i can choose the bands to work with?

thanks jim


On Thu, Mar 3, 2016 at 1:30 PM, [hidden email] <[hidden email]> wrote:
Jim,

$ ossim-chipper --histogram-op auto-minmax --op ortho --output-radiometry U8 <in_file> <out_file>

That will stretch then remap.  Not sure if that's what you wanted...

See:
https://trac.osgeo.org/ossim/wiki/ossim-chipper

Usage also has a bunch of examples.

Dave


On 03/03/2016 01:20 PM, jim hopper wrote:
I have an image that uses 11 bits per pixel and looking at the histogram, the values in the file are in the top 2 or 3 bits.  The result of this is that if i use scalerRemapper to convert to 8 bits/pixel i get and image with most of the pixels black.  i can do a histogram remap manually to the image before moving it to 8 bits/pixel and get a decent image.  Would like to do this automatically.  is there any support in ossim to optimize the histogram for the eight bits/pixel output automatically?

Thanks jim






------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
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: convert from 11 bits per pixel to 8 bits per pixel

DBurken@Radiantblue.com
In reply to this post by James E. Hopper-2
Jim,

Example, below class is a ossimChipperUtil wrapper used for our java
bindings.

https://trac.osgeo.org/ossim/browser/trunk/oms/coms/src/oms/Chipper.cpp

On 03/03/2016 02:39 PM, jim hopper wrote:
> I will look at the chipper code to see how i can add that into our code.


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
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: convert from 11 bits per pixel to 8 bits per pixel

James E. Hopper-2
Thanks that looks really good!

On Thu, Mar 3, 2016 at 3:02 PM, [hidden email] <[hidden email]> wrote:
Jim,

Example, below class is a ossimChipperUtil wrapper used for our java
bindings.

https://trac.osgeo.org/ossim/browser/trunk/oms/coms/src/oms/Chipper.cpp

On 03/03/2016 02:39 PM, jim hopper wrote:
> I will look at the chipper code to see how i can add that into our code.



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
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: convert from 11 bits per pixel to 8 bits per pixel

DBurken@Radiantblue.com
In reply to this post by James E. Hopper-2

ossim-preproc -r -o --ch <in_file>
ossim-chipper --bands 2,3,5 --histogram-op auto-minmax --op ortho --output-radiometry U8 <in_file> <out_file>

On 03/03/2016 02:39 PM, jim hopper wrote:
Ok, i did this

ossim-icp nitf_block_band_separate -b 2,3,5 08JUN15WV031300015JUN08174404-M1BS-500339281010_01_P001_________GA_E0AAAAAAKAAF0.NTF test_nitf.ntf
ossim-preproc -o --ch test_nitf.ntf
ossim-chipper  --histogram-op auto-minmax --op ortho --output-radiometry U8 test_nitf.ntf test_out.nitf


this produced an RGB image with a 8 bits per pixel that was fairy close, probably as close as we can get without manual intervention.

I will look at the chipper code to see how i can add that into our code.

Thanks a Lot!
 jim


On Thu, Mar 3, 2016 at 2:28 PM, jim hopper <[hidden email]> wrote:
Thanks, tried it, didn't seem to work.  let me expand on what i am doing i have an image thats 8 bands, with 11 bits per pixel).  i want to pull out the RGB bands (which i can find they are bands 2, 3, 5 and optimize the histogram for that.  i am trying now to use ice to copy out the three bands, then i will retry chipper and see if that helps.  i don't see anything in the options that looks like i can choose the bands to work with?

thanks jim


On Thu, Mar 3, 2016 at 1:30 PM, [hidden email] <[hidden email]> wrote:
Jim,

$ ossim-chipper --histogram-op auto-minmax --op ortho --output-radiometry U8 <in_file> <out_file>

That will stretch then remap.  Not sure if that's what you wanted...

See:
https://trac.osgeo.org/ossim/wiki/ossim-chipper

Usage also has a bunch of examples.

Dave


On 03/03/2016 01:20 PM, jim hopper wrote:
I have an image that uses 11 bits per pixel and looking at the histogram, the values in the file are in the top 2 or 3 bits.  The result of this is that if i use scalerRemapper to convert to 8 bits/pixel i get and image with most of the pixels black.  i can do a histogram remap manually to the image before moving it to 8 bits/pixel and get a decent image.  Would like to do this automatically.  is there any support in ossim to optimize the histogram for the eight bits/pixel output automatically?

Thanks jim






------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
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: convert from 11 bits per pixel to 8 bits per pixel

James E. Hopper-2
Thanks that will do it.

On Thu, Mar 3, 2016 at 2:59 PM, [hidden email] <[hidden email]> wrote:

ossim-preproc -r -o --ch <in_file>
ossim-chipper --bands 2,3,5 --histogram-op auto-minmax --op ortho --output-radiometry U8 <in_file> <out_file>


On 03/03/2016 02:39 PM, jim hopper wrote:
Ok, i did this

ossim-icp nitf_block_band_separate -b 2,3,5 08JUN15WV031300015JUN08174404-M1BS-500339281010_01_P001_________GA_E0AAAAAAKAAF0.NTF test_nitf.ntf
ossim-preproc -o --ch test_nitf.ntf
ossim-chipper  --histogram-op auto-minmax --op ortho --output-radiometry U8 test_nitf.ntf test_out.nitf


this produced an RGB image with a 8 bits per pixel that was fairy close, probably as close as we can get without manual intervention.

I will look at the chipper code to see how i can add that into our code.

Thanks a Lot!
 jim


On Thu, Mar 3, 2016 at 2:28 PM, jim hopper <[hidden email]> wrote:
Thanks, tried it, didn't seem to work.  let me expand on what i am doing i have an image thats 8 bands, with 11 bits per pixel).  i want to pull out the RGB bands (which i can find they are bands 2, 3, 5 and optimize the histogram for that.  i am trying now to use ice to copy out the three bands, then i will retry chipper and see if that helps.  i don't see anything in the options that looks like i can choose the bands to work with?

thanks jim


On Thu, Mar 3, 2016 at 1:30 PM, [hidden email] <[hidden email]> wrote:
Jim,

$ ossim-chipper --histogram-op auto-minmax --op ortho --output-radiometry U8 <in_file> <out_file>

That will stretch then remap.  Not sure if that's what you wanted...

See:
https://trac.osgeo.org/ossim/wiki/ossim-chipper

Usage also has a bunch of examples.

Dave


On 03/03/2016 01:20 PM, jim hopper wrote:
I have an image that uses 11 bits per pixel and looking at the histogram, the values in the file are in the top 2 or 3 bits.  The result of this is that if i use scalerRemapper to convert to 8 bits/pixel i get and image with most of the pixels black.  i can do a histogram remap manually to the image before moving it to 8 bits/pixel and get a decent image.  Would like to do this automatically.  is there any support in ossim to optimize the histogram for the eight bits/pixel output automatically?

Thanks jim







------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer