Search found 15 matches

by jgrauman
2011-06-06T13:09:40-07:00
Forum: Users
Topic: optimizing 'convert' speed
Replies: 33
Views: 104537

Re: optimizing 'convert' speed

FYI: Maybe I'm missing something, but can't I just combine the scale to square pixels and user scaling into one step? It looks like it's working perfectly for me this way. I wrote a program (in C++/Qt) that calculates the smallest scale factors that after a given rotation a 640x480 rectangle will fi...
by jgrauman
2011-06-05T08:50:58-07:00
Forum: Users
Topic: optimizing 'convert' speed
Replies: 33
Views: 104537

Re: optimizing 'convert' speed

Quick followup question: For the SRT, in order to define the x and y scale components separately, you need to use the form of SRT with at least 5 parameters: X,Y ScaleX,ScaleY Angle. I would like the X and Y to be set to the center of the image automatically, what would the formula for that be? Than...
by jgrauman
2011-06-04T22:29:14-07:00
Forum: Users
Topic: optimizing 'convert' speed
Replies: 33
Views: 104537

Re: optimizing 'convert' speed

It's working perfectly now. Here's the final command for those interested. I wrote a program to calculate the scale values (here .604 and .453) for a given rotation (here 0.8), and everything else was straightforward: convert in.tga -background white -virtual-pixel background -set option:distort:vie...
by jgrauman
2011-06-04T10:41:17-07:00
Forum: Users
Topic: optimizing 'convert' speed
Replies: 33
Views: 104537

Re: optimizing 'convert' speed

I'm thinking now the SRT can handle this for me perfectly. I didn't realize I could do a scale that had different x and y components. So I can calculate the x and y scale factors such that my original 1920x1080 image will get scaled down to something that when rotated will yield a 640x480 center ima...
by jgrauman
2011-06-03T09:32:36-07:00
Forum: Users
Topic: optimizing 'convert' speed
Replies: 33
Views: 104537

Re: optimizing 'convert' speed

Just for clarity's sake, let me explain the whole process. 1) I start with thousands of images for each video that have been extracted from the video with ffmpeg. 2) These images all have a slight rotational error that I want to correct before turning back into video. 3) The original images are 1440...
by jgrauman
2011-06-03T09:13:42-07:00
Forum: Users
Topic: optimizing 'convert' speed
Replies: 33
Views: 104537

Re: optimizing 'convert' speed

Hey wow, this is great! I knew there would be a formula to calculate this, but my trig/geometry was too rusty to figure it out! I had just written a program to calculate it iteratively, but the direct formula is much better. Basically what I'm doing is like your new example, my videos were taken wit...
by jgrauman
2011-06-02T13:09:50-07:00
Forum: Users
Topic: optimizing 'convert' speed
Replies: 33
Views: 104537

Re: optimizing 'convert' speed

I'd like to have IM automatically figure out the best crop, since I'm converting about 50 videos, so I'd rather not have to calculate everything by hand. The rotate command will be the same for each video, so I guess if I have to, I can do the 50 calculations... Right now the fastest command I've co...
by jgrauman
2011-06-02T10:34:59-07:00
Forum: Users
Topic: optimizing 'convert' speed
Replies: 33
Views: 104537

Re: optimizing 'convert' speed

To put the problem graphically (see link), if the white box represents my original image that has been rotated, IM is returning the blue box as the viewport and I want the red box as the viewport. Any idea of how to do this???

http://grauman.com/box.png

Thanks!

Josh
by jgrauman
2011-06-02T09:35:35-07:00
Forum: Users
Topic: optimizing 'convert' speed
Replies: 33
Views: 104537

Re: optimizing 'convert' speed

FMW42, The -distort SRT did indeed help! The problem I'm having now involves setting the viewport correctly. I tried the method for the Centered Square Crop, but it creates a viewport that includes the entire rotated image (which has corners of distortion), whereas I would like the viewport set enti...
by jgrauman
2011-06-01T15:50:53-07:00
Forum: Users
Topic: optimizing 'convert' speed
Replies: 33
Views: 104537

Re: optimizing 'convert' speed

mogrify and convert ended up taking the same amount of time...
by jgrauman
2011-06-01T13:21:30-07:00
Forum: Users
Topic: optimizing 'convert' speed
Replies: 33
Views: 104537

Re: optimizing 'convert' speed

Thanks, I'm recompiling as Q8. OpenMP compiled in as well. We'll see how much that helps. If anyone knows any other tricks, please let me know. Thanks!
by jgrauman
2011-06-01T13:12:46-07:00
Forum: Users
Topic: optimizing 'convert' speed
Replies: 33
Views: 104537

Re: optimizing 'convert' speed

I had just downloaded and installed latest IM. Here is my version... Version: ImageMagick 6.7.0-2 2011-06-01 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC Features: OpenMP What is Q16 and Q8 IM? I'm on Linux and have multiple cores (just ordered a 4-core CP...
by jgrauman
2011-06-01T12:56:38-07:00
Forum: Users
Topic: optimizing 'convert' speed
Replies: 33
Views: 104537

optimizing 'convert' speed

Hello, I need to perform the following operation thousands of times, and so want to know if there is any way I can speed it up. Is this operation multi-threaded? Any compile settings that will help significantly? Other tricks/tips? Thanks! convert image1.tga -rotate 1.2 -crop '1000x1000+20+20' -scal...
by jgrauman
2010-06-16T08:57:15-07:00
Forum: Users
Topic: Semi-Transparent Text on Transparent Background
Replies: 4
Views: 15610

Re: Semi-Transparent Text on Transparent Background

Thanks! Works like a charm.
by jgrauman
2010-06-15T23:47:47-07:00
Forum: Users
Topic: Semi-Transparent Text on Transparent Background
Replies: 4
Views: 15610

Semi-Transparent Text on Transparent Background

Hello all, I'm trying to figure out how to create text with a completely transparent background, where the text itself has some transparency as well. I'd like text that is 20% transparent on a completely transparent background. The following achieves what I want (minus the transparent text). Can som...