ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rotate image

Hi
 
I have a narrow but very long image (2047 x 16,000) which I wish to rotate by 90 deg so I make better use of the display screen. Using 'IMAQ rotate' this takes on average 2.5 sec. I then tried 'image_to_array, transpose_array, array_to_image, but this took even longer 3.2 sec. As this is only a transpose operation and and no re-calculation of pixels is required why does it take this long ?
 
Is there some other way to speed it up.
 
Willem
 
PS (Using LabView 7.1 and Vision 7.1)
0 Kudos
Message 1 of 17
(5,497 Views)
Hi Willem,

Could you try with this vi...
I don't remember exactly where I found it, but it was on labVIEW Zone, maybe it can be of interest for you..

If so, get inspired !

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 17
(5,477 Views)

Hi TiTou,

This looks a lot like an example posted by Christian in the "Picture Control" thread.

http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=14&jump=true

Does this look familiar?

 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 17
(5,456 Views)
Yep Ben, this is certainly correct... I used it as a source of inspiration a couple of month ago and couldn't remember the thread it was coming from ; so many thanks to Christian.

I hope nobody minds if I use it... 'cause I like it ! Smiley Tongue

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 17
(5,450 Views)

I suggest you throw a couple of extra stars on Christian's original post just to be safe. Smiley Happy

And thank YOU for giving me another excuse to plug the "Picture Control" thread. Smiley Wink

Ben

Message Edited by Ben on 01-11-2006 08:21 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 17
(5,445 Views)
I wish I could... but I already did give him a 5, when I first saw the vi... Smiley Wink

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 6 of 17
(5,436 Views)

"I wish I could... but I already did give him a 5, when I first saw the vi...  "

Pay in advance?

Great idea!

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 17
(5,429 Views)
Am I missing the point ?
I meant I gave him stars because I liked his VI the first time I saw it a couple of months ago.

There's no pay in advance, is there ? Or do you you mean I should pay in advance for the next time I'll use one of his VI ?
Well, great idea.. how can proceed to do so ? Smiley Very Happy

have fun and a good day Smiley Wink

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 8 of 17
(5,425 Views)
TiTou/Ben
 
Never mind the stars, you seem to rather have missed the point of this question. I have a very large image (2047 X16,000), which I want to rotate by 90 deg. When I try to make the image larger in your vi, it just grinds to a halt well before it reaches the size I want to rotate.
 
Any other ideas?
 
Thanks
 
Willem
 
 
 
 
0 Kudos
Message 9 of 17
(5,422 Views)
Hi willem,
 
If you use that example "out of the box" for an image that large, it looks like you will need as much as a Gig or more to handle an image that is 16K X 16K.
 
Even if you have that much memory to play with LV may have trouble allocating contiguous buffers that large.
 
You will probably have to "divide and conquer" to win this battle.
 
I suspect if you grab 2047 X 2047 sections sections, and then rotate each setion (using the method Christian illustrated) you should be able to put the image back together again.
 
Does that help?
 
Ben
 
BTW: The reference to stars is part of a running joke that the "Gold bars" (non-NI) contributors work for stars (not penuts).
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 10 of 17
(5,356 Views)