On Sun, Aug 29, 2010 at 3:23 PM, Craig DeForest
<[email protected]> wrote:
> Puneet, you're running afoul of the age-old "video coordinates" vs. "data
> coordinates" problem.  TVs scan top to bottom, so traditionally image "Y"
> coordinates run from top to bottom.  Yuck.


Thanks Craig. That was it. It didn't even occur to me that would be
the issue... I deal with that when working with maps all the time, but
here, since I was plotting each pixel directly as is, I thought it
would look the way it was loaded. I guess not.


>
> Anyway, "$a->(:,-1:0:-1)" will do the trick (affine transformation with a
> negative increment).


Now, do me one more favor. Please explain what on earth is going on
there? I modified the above to use slice as I am not using the
NiceSlice source filter... so, I have

$a = $a->slice(':,-1:0:-1')

But, while the above works, I can't make head or tail of it. I am
reading up on affine transform at [1] and [2] but they don't do it for
me. And that decrement? What is going on?

[1] http://mathworld.wolfram.com/AffineTransformation.html
[2] http://en.wikipedia.org/wiki/Affine_transformation

>
> On Aug 29, 2010, at 1:51 PM, P Kishor wrote:
>
>> This is bizarre... I am getting a file that ostensibly looks like so
>>
>> x o x o o
>> o x x o o
>> o o o x o
>> o o x o o
>>
>> I am reading it in PDL and plotting it out (using wpic), and I am getting
>>
>> o o x o o
>> o o o x o
>> o x x o o
>> x o x o o
>>
>> That is, the image is flipped vertically. Why? And, how can I flip the
>> data... I have read through xchg and transpose and reorder... those
>> don't do the trick, at least not by themselves.
>>
>>
>>
>>
>> --
>> Puneet Kishor
>>
>> _______________________________________________
>> Perldl mailing list
>> [email protected]
>> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>>
>
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================

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

Reply via email to