________________________________
From: MARK BAKER <[email protected]>
To: Matthew Kenworthy <[email protected]>
Sent: Thursday, September 15, 2011 2:37 PM
Subject: Re: [Perldl] Can any one help me on this ???


Hey Matt

I want to be able to take a large matrix of "ones" and "zeros" (about 150000)
and make a 2D  black and white picture ...

for example if i had the matrix

[0 1 0 1 0 1 0]
[0 1 1 1 1 1 1]
[1 1 1 1 1 1 0]

I want to make a Black and white picture like 

 ■  ■  ■ 

 ■■■■■■
■■■■■■


now if you can see that it is some black squares 

and the lack of black squares , and I want to use 

use PDL::Image2D  and     imagrgb  to do it 

im just lacking the the way to go about it properly 

so im doing some reading, I wonder tho if you could 

help me !

Thanks

Mark R Baker















________________________________
From: Matthew Kenworthy <[email protected]>
To: MARK BAKER <[email protected]>
Sent: Thursday, September 15, 2011 2:01 PM
Subject: Re: [Perldl] Can any one help me on this ???

Mark,

I'm not sure what you're trying to do - do you want to display a 2D
image on a display?

Matt

On Thu, Sep 15, 2011 at 10: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
>
>



-- 
Matthew Kenworthy / Assistant Professor / Leiden Observatory
Niels Bohrweg 2 (#463) / P.O. Box 9513 / 2300 RA Leiden / NL
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to