Grabbing LSBs of image pixels



Hello,

Does anyone know an easy way to reference only single bits of an image?

I have an image that is 512x512 in size, and I need a user to be able to select
an LSB plane to look at. For example, they could choose 'second least
significant bit' which should then show all the 1s and 0s for the second least
significant bit as follows:

Image (2-pixels for illustration)

pixel 1: 00110110
pixel 2: 01100101

so if the user selects 'second least significant bit', it should return '1 0' for
this example.

I think the function 'bitand' is the one I need to use, but I am not sure how to
use it to solve this problem.

Any help would be gratefully appreciated!
.



Relevant Pages

  • Re: spatial autocorelation methods
    ... the reference data set is of much finer resolution than the data ... one coarse pixel set we are ... calling the pixel 'footprint'. ...
    (sci.image.processing)
  • Re: spatial autocorelation methods
    ... the reference data set is of much finer resolution than the data ... > of very coarse resolution and has been reprojected/regridded onto the finer ... > one coarse pixel set we are ...
    (sci.image.processing)
  • Re: POCKET PC GUI issue
    ... I posted a reference to source ... code for several relevant functions. ... the GUI which i have made runs fine in an some versions of IPAQ(hp ... 320 pixel size and OS version is winCE4.21. ...
    (microsoft.public.pocketpc.developer)
  • Nikon lets 24.4mp D3x out of the bag
    ... The Nikon D3 latest firmware release has clear reference to 6048x4032 pixel size option, and "D3X" name in the code. ...
    (rec.photo.digital.slr-systems)