Is there any way to use im2java2d in a parallel pool worker?

1 回表示 (過去 30 日間)
Samuli Ulmanen
Samuli Ulmanen 2016 年 4 月 25 日
編集済み: Samuli Ulmanen 2016 年 4 月 30 日
I'm testing some java hash functions that take BufferedImage as input. I'm using im2java2d and now I would like to parallelize. Instead I get
IMJAVA2D is not available on this platform.
Is there a way out of this?

回答 (1 件)

Tushar Athawale
Tushar Athawale 2016 年 4 月 29 日
Hi Samuli,
Are you trying to call Java functions from MATLAB? Please attach a sample script, if possible. Are you using MATLAB "parfor" to parallelize your code?
- Tushar
  1 件のコメント
Samuli Ulmanen
Samuli Ulmanen 2016 年 4 月 30 日
編集済み: Samuli Ulmanen 2016 年 4 月 30 日
Hi Tushar,
I managed to fix my issues in two steps.
1. Put all my java dependencies on the static class path via in ~/.matlab/R2105b/javaclasspath.txt (complete path with jar file name and extension)
2. copy im2java2d.m to my working directory and remove the abort code from the beginning of the script. Works beautifully.
I am using parfor and managed to run my code using multiple workers.
Hope this is useful for someone.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by