Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > From AffineTransform to PerspectiveTransform

Reply
Thread Tools

From AffineTransform to PerspectiveTransform

 
 
Arne Vajhøj
Guest
Posts: n/a
 
      10-28-2008
zerg wrote:
> Arne Vajhøj wrote:
>> zerg wrote:
>>> Harold Yarmouth wrote:
>>>> What is your problem with me, anyway? It's apparently personal.
>>>> Yet I've never interacted with you before this thread, so how the hell
>>>> can it be?
>>>
>>> Our "friend" Peter Duniho seems to behave the same way towards many
>>> people, so it probably isn't personal. Just an attitude problem on
>>> his part.

>>
>> Why are you talking to yourself ?

>
> I'm not, you nincompoop, I'm talking to Harold Yarmouth. Isn't that
> obvious?


Yes. Exactly. Which is why I asked the question.

Arne
 
Reply With Quote
 
 
 
 
zerg
Guest
Posts: n/a
 
      10-29-2008
Arne Vajhøj wrote:
> zerg wrote:
>> Arne Vajhøj wrote:
>>> zerg wrote:
>>>> Harold Yarmouth wrote:
>>>>> What is your problem with me, anyway? It's apparently personal.
>>>>> Yet I've never interacted with you before this thread, so how the hell
>>>>> can it be?
>>>>
>>>> Our "friend" Peter Duniho seems to behave the same way towards many
>>>> people, so it probably isn't personal. Just an attitude problem on
>>>> his part.
>>>
>>> Why are you talking to yourself ?

>>
>> I'm not, you nincompoop, I'm talking to Harold Yarmouth. Isn't that
>> obvious?

>
> Yes. Exactly. Which is why I asked the question.


But that doesn't make any sense. You asked the question *because* the
answer was obviously "I'm not"??? Because, rather than despite?

You're strange.
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      11-03-2008
On Oct 24, 1:59 am, "John B. Matthews" <(E-Mail Removed)> wrote:
....
> You might look at PerspectiveTransform:
>
> <http://java.sun.com/products/java-me...jai-apidocs/ja
> vax/media/jai/PerspectiveTransform.html>


Yes. That worked a treat.

I downloaded the wrong SDK and it failed when I
did not have a (J2SE) 1.3 SDK installed, but with
the docs and guide in hand, and a couple of Jar's
from an older release, I got it to do what I wanted
(I got exceptions because the natives were missing,
but since JAI was quite willing to WTE '..revert to
pure Java..' that was not a significant problem).

The code was hacked in around a previous GUI that
was written for aligning spherical images (moon
phases) and had a lot of the little UI bits I needed
to make it workable (e.g. panels to highlight points
with zoom, and accepting keyboard focus to adjust the
exact position of the point).

Now, I actually coded this because I made a rash
promise to my sister that I could correct the skew
in photos of images under glass. I had a quick look
at the motley collection of programs I had for image
manipulation, and was surprised to see that *none*
of them offered to correct such perspective skewed
images.

As a more general question, does anybody know of
programs that *do* offer perspective transforms?

I was vaguely considering offering it as a web
start app. if I can locate an existing (JWS based)
implementation of JAI, though it would take at
least as much code again, to make it usable as
a general program.

Ahh.. it seems it is here
<http://download.java.net/lg3d/test/jai.jnlp>

--
Andrew T.
PSCode.org
 
Reply With Quote
 
RedGrittyBrick
Guest
Posts: n/a
 
      11-03-2008

Peter Duniho wrote:
> On Sun, 02 Nov 2008 21:25:22 -0800, Andrew Thompson
> <(E-Mail Removed)> wrote:
>
>> [...]
>> As a more general question, does anybody know of
>> programs that *do* offer perspective transforms?

>
> It's not a Java program, but Photoshop Elements does. Its "Skew"
> command allows you to move any corner of a selection in any direction.
> Move two corners toward or away from each other, and you wind up with a
> sort of perspective transform.
>
> Given that GIMP is supposed to be a Photoshop competitor, I'd be really
> surprised if GIMP couldn't do the same thing. Maybe even with basically
> the same UI. But I don't have it installed at the moment, so I can't
> check to see for sure.


GIMP does perspective transforms. Context menu, Tools, Transform Tools
has Rotation, Scaling, Shearing and Perspective transforms. The last of
which works in the way you describe.

--
RGB
 
Reply With Quote
 
John B. Matthews
Guest
Posts: n/a
 
      11-03-2008
In article
<(E-Mail Removed)>,
Andrew Thompson <(E-Mail Removed)> wrote:

> [...] promise to my sister...
> As a more general question, does anybody know of
> programs that *do* offer perspective transforms?


On the chance that she has access to a Mac, the included Developer Tools
DVD includes /Developer/Applications/Graphics Tools/Core Image Fun
House. It exercises the Quartz facilities, including perspective
transform.

--
John B. Matthews
trashgod at gmail dot com
http://home.roadrunner.com/~jbmatthews/
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      11-04-2008
On Nov 3, 8:04 pm, "Peter Duniho" <(E-Mail Removed)>
wrote:
> On Sun, 02 Nov 2008 21:25:22 -0800, Andrew Thompson
>
> <(E-Mail Removed)> wrote:
> > [...]
> > As a more general question, does anybody know of
> > programs that *do* offer perspective transforms?

>
> It's not a Java program, but Photoshop Elements does.


That's cool, I was just wondering generally.

It seems with PhotoShop for Windows based
machines, GIMP for *nix, and the one John
mentioned for Mac, that the field is well
covered. I won't bother proceeding with
another specialist program (though I'll keep
it handy for my own use).

Thanks all.

--
Andrew T.
pscode.org
 
Reply With Quote
 
Nigel Wade
Guest
Posts: n/a
 
      11-04-2008
Andrew Thompson wrote:

> On Nov 3, 8:04 pm, "Peter Duniho" <(E-Mail Removed)>
> wrote:
>> On Sun, 02 Nov 2008 21:25:22 -0800, Andrew Thompson
>>
>> <(E-Mail Removed)> wrote:
>> > [...]
>> > As a more general question, does anybody know of
>> > programs that *do* offer perspective transforms?

>>
>> It's not a Java program, but Photoshop Elements does.

>
> That's cool, I was just wondering generally.
>
> It seems with PhotoShop for Windows based
> machines, GIMP for *nix, and the one John
> mentioned for Mac, that the field is well
> covered. I won't bother proceeding with
> another specialist program (though I'll keep
> it handy for my own use).
>
> Thanks all.


GIMP is available for all those platforms - and it's free.
For other platforms the source is available.

Although, as the manual points out, it's not really a perspective tool but
rather a distort tool as no rules of perspective are imposed.

--
Nigel Wade
 
Reply With Quote
 
John B. Matthews
Guest
Posts: n/a
 
      11-04-2008
In article <gepp1i$8o6$(E-Mail Removed)>,
Nigel Wade <(E-Mail Removed)> wrote:

> Andrew Thompson wrote:
>
> > On Nov 3, 8:04 pm, "Peter Duniho" <(E-Mail Removed)>
> > wrote:
> >> On Sun, 02 Nov 2008 21:25:22 -0800, Andrew Thompson
> >>
> >> <(E-Mail Removed)> wrote:
> >> > [...]
> >> > As a more general question, does anybody know of
> >> > programs that *do* offer perspective transforms?
> >>
> >> It's not a Java program, but Photoshop Elements does.

> >
> > That's cool, I was just wondering generally.
> >
> > It seems with PhotoShop for Windows based
> > machines, GIMP for *nix, and the one John
> > mentioned for Mac, that the field is well
> > covered. I won't bother proceeding with
> > another specialist program (though I'll keep
> > it handy for my own use).

>
> > Thanks all.

>
> GIMP is available for all those platforms - and it's free.
> For other platforms the source is available.


I just learned that Photoshop Elements version < 4 breaks under Mac OS X
10.5.1+, but GIMP is quite usable:

<http://sourceforge.net/projects/gimponosx/>

> Although, as the manual points out, it's not really a perspective
> tool but rather a distort tool as no rules of perspective are
> imposed.


Surely. I confess an affinity for the GIMP user interface, which lets me
drag the corners as well as adjust the transformation matrix entries.

--
John B. Matthews
trashgod at gmail dot com
http://home.roadrunner.com/~jbmatthews/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does AffineTransform not work on JTextPane? fiziwig Java 10 08-14-2006 08:51 AM
AffineTransform, RescaleOp and Bilinear hint news.skynet.be Java 0 03-25-2005 12:00 PM
AffineTransform substitute for 1.1 jdk? SPG Java 0 03-04-2005 12:25 PM
AffineTransform rotation question hilz Java 2 12-17-2004 07:45 PM
Problem using AffineTransform Rick Java 2 10-08-2003 10:46 AM



Advertisments