Hi MARK-

It looks like you've gotten answers already.  Your question
points to some possible improvements in the image display
documentation as to input data types and displayed results.

For imag2d and imagrgb/imagrgb3d when the data is a
floating point type, it is assumed to be a color or intensity
value on the range [0,1] so you'll need to normalize
appropriately.  With imag2d, if your data type is an
integer then the range is [0,255] for byte, [0,32767] for short,
[0,65535] for ushort,...

Other image display and IO routines usually scale the
output.

--Chris

On Thu, Sep 15, 2011 at 4:01 PM, MARK BAKER <[email protected]> wrote:
> ________________
> I have been trying to get a binary 2D picture where the zeros are black and
> the ones are white
> but im having trouble trying to figure out how to put
>
> [0 1 0 0 1 1 1 0 1 0 1 0]
> [0 1 0 1 1 0 1 1 1 0 1 0]
> [0 1 1 0 1 0 1 0 1 1 1 0]
>
> something like this in a black and white picture
>
> can any one help me with this ...
>
> my attempt at rewriting the lucy demo to it
> is but I feel really lost here...
>
> use PDL; use PDL::Image2D; use PDL::Graphics::TriD;nokeeptwiddling3d;
>
>
> for $x (0..1,1,1,0) {
> for $y (reverse 0..1,0,0,1) {
> for $z (reverse 1..999) {
>  $z = 0.001*$z;
>  $d=byte(random(zeroes(1000,100))>$z);
>  $k=byte [[$x,$y,$x,$y],[$y,$y,$x,$y],[$y,$x,$x,$x]];
> do{ imagrgb [$d];
>  $s=conv2d($d,$k);
>  $d&=($s<5);
>  $d&=($s>1);
>  $d|=($s==3);
> } while (!twiddle3d);
> }
> } }
>
> Thanks
>
> Mark R Baker
>
> ______________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
>
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
>

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to