|
From: willem on 11 Jan 2006 06:40 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)
From: Ben on 11 Jan 2006 09:10 Hi TiTou, This looks a lot like an example posted by Christian in the "Picture Control" thread. <a href="http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=14&jump=true" target="_blank">http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=14&jump=true</a> Does this look familiar? <img src="http://forums.ni.com/attachments/ni/BreakPoint/748/1/RotateVase.PNG"> Ben
From: willem on 11 Jan 2006 10:10 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
From: Ben on 11 Jan 2006 10:40 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).
From: altenbach on 11 Jan 2006 10:40 willem wrote: 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 ? This is certainly a big image. Is this paletted or 24 bit? You should make very sure that you don't create too many additional copies in memory. Transposing a 2D array requires rearranging virtually all of the data in memory. This is expensive for huge arrays.
|
Next
|
Last
Pages: 1 2 Prev: Labview 6.1 vi's for NI USB-8451 Next: Error 1402 Insufficient Access to a Registry Key |