Message Boards Message Boards

1
|
5043 Views
|
5 Replies
|
2 Total Likes
View groups...
Share
Share this post:

FindGeometricTransform seems to block on 10 MP images

Posted 10 years ago

Hello. I admit I'm very new to Mathematica; I'm loving it so far. One of the things I want to do with it is stitch together the aerial images I take with my drone, to form a mosaic. So far I've tried FindGeometricTransform with two 4384 x 2466 images, but the evaluation never finishes, with "Running..." displayed, even after leaving it run overnight. The examples in the documentation run quite quickly, so are my images too big?

My machine is a recent MacBook Pro with 2.8 GHz Intel Core i7 and 16 GB of memory. The machine doesn't seem to be working very hard; CPU load is barely above 25% during evaluation and there's lots of free memory.

Any suggestions to make it evaluate in a reasonable time (at all?) are welcome.

In[6]:= $Version

Out[6]= "10.0 for Mac OS X x86 (64-bit) (December 4, 2014)"

The evaluation that never ends.

5 Replies
Posted 10 years ago

My MacBook Pro has 16 GB. Evaluating MaxMemoryUsed[] returns 402 903 496.

You have enough memory. Probably you have a CPU with 4 cores and MathKernel completely uses resources of one core (permanent CPU load is 25%). AFAIK the FindGeometricTransform function cannot use more than one core, the same is true for the most functions in Mathematica. The built-in Parallel* functionality can help if you can parallelize your task by yourself.

POSTED BY: Alexey Popkov

I reduced the images 50% and now the expression evaluates in about 10 minutes. So it wasn't really blocked, it was just working. I'm still puzzled why the CPU load was so low; it never went above 30%.

Posted 10 years ago

I'm still puzzled why the CPU load was so low; it never went above 30%.

How many physical memory do you have? The usual reason for low CPU load is insufficient physical memory which causes swapping. You can get the memory required for evaluation of your code by evaluating MaxMemoryUsed[] after the code. Note that the value returned includes only memory used by the Kernel and does not include the memory used by the FrontEnd.

POSTED BY: Alexey Popkov

Thanks Alexey. My MacBook Pro has 16 GB. Evaluating MaxMemoryUsed[] returns 402 903 496. Evaluating the FindGeometricTransform expression takes 10 minutes, but doesn't load the CPU beyond 30%. I would expect the evaluation to use more of the CPU to get the result more quickly. I'm using Mathematica Home Edition; is it unable to use all available resources?

This MacBook Pro has two cores, so your point about a function only using one core helps it make sense. Thanks for your help.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract