Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to multithread imdecode with base64 input data

Hi, i work with base64 format input image.

Here my C++ code:

//In normal condition img_base64 is a unknown size and format image ( in this time processing test I use an image with 1258 × 834 42Ko .png format )

string img_str =   base64_decode(img_base64); // 13ms 
vector<uchar>      img_data(img_str.begin(), img_str.end()); //2ms
Mat img =          imdecode(img_data, IMREAD_UNCHANGED);   // 33ms

(time processing is procced with getTickCount)

You can see that imdecode is very long to execute. In my application time processing is very important. I would like to know how if is possible to parallelize imdecode without including third library, for example by divide "img_data" into 4 part of image and using pthread in each part?

I listen all others solutions.

Thx.

how to multithread imdecode with base64 input data

Hi, i work with base64 format input image.

Here my C++ code:

//In normal condition img_base64 is a unknown size and format image ( in this time processing test I use an image with 1258 × 834 42Ko 420Ko .png format )

string img_str =   base64_decode(img_base64); // 13ms 
vector<uchar>      img_data(img_str.begin(), img_str.end()); //2ms
Mat img =          imdecode(img_data, IMREAD_UNCHANGED);   // 33ms

(time processing is procced with getTickCount)

You can see that imdecode is very long to execute. In my application time processing is very important. I would like to know how if is possible to parallelize imdecode without including third library, for example by divide "img_data" into 4 part of image and using pthread in each part?

I listen all others solutions.

Thx.

how to multithread imdecode with base64 input data

Hi, i work with base64 format input image.

Here my C++ code:

//In normal condition img_base64 is a unknown size and format image ( in this time processing test I use an image with 1258 × 834 420Ko .png format )

string img_str =   base64_decode(img_base64); // 13ms 
vector<uchar>      img_data(img_str.begin(), img_str.end()); //2ms
Mat img =          imdecode(img_data, IMREAD_UNCHANGED);   // 33ms

(time processing is procced with getTickCount)

You can see that imdecode is very long to execute. In my application time processing is very important. I would like to know how if is possible to parallelize imdecode without including third library, for example by divide "img_data" into 4 part of image and using pthread in each part?

I listen all others solutions.

Thx.