- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried DMIP Histogram Node .
It is giving correct results for histogram of an image for single core platform(P4).
This I verified by summing all histogram value and came equal to size(height*width) of an image
But same code ,I compiled on (i7 ,Dual core ) platform and executed ,histogram values are not matching.
I feel its because DMIP would carrying out histogram operation parallely on different cores.
Can someone justify?
Any quick help would be greatly appreciated.
Thanks in advance ,
Kishor
I tried DMIP Histogram Node .
It is giving correct results for histogram of an image for single core platform(P4).
This I verified by summing all histogram value and came equal to size(height*width) of an image
But same code ,I compiled on (i7 ,Dual core ) platform and executed ,histogram values are not matching.
I feel its because DMIP would carrying out histogram operation parallely on different cores.
Can someone justify?
Any quick help would be greatly appreciated.
Thanks in advance ,
Kishor
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Need to use HistogramStore object instead of Store object for correct histogram accumulation. That why you observe wrong results in multi core environtment.
Igor S. Belyakov
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kishor,
Could you please provide a test case for the problem? You may use private to attach the file if it is confidential.
Best Regards,
Ying
Could you please provide a test case for the problem? You may use private to attach the file if it is confidential.
Best Regards,
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have tested for various images like, lena.jpg, barbara.jpg, woman.jpg, cameraman.jpg.
Test platforms are :
1. Intel P4
2. Intel dual-core
3.Intel i-7 (2600)
code:
// Node creation
Image *A=&img1;
Image *D=&dst;
// Source nodes
SrcNode *in1=new SrcNode();
in1->Init(A);
//
Scalar nLevels(256);
Scalar lowerLevel(0);
Scalar upperLevel(256);
HistogramNode *hgNode = new HistogramNode();
hgNode->Init(nLevels,lowerLevel,upperLevel);
Store *hgStoreNode = new Store(1,sizeof(int)*256);
DstStoreNode *out= new DstStoreNode();
out->Init(hgStoreNode);
Graph *g = new Graph();
g->Add(in1);
g->Add(hgNode);
g->Add(out);
g->Link(0,0,1,0);
g->Link(1,0,2,0);
g->Compile(img->width,img->height);
g->Execute();
int *histo;
histo=(int*)hgStoreNode->BufferPtr();
Test platforms are :
1. Intel P4
2. Intel dual-core
3.Intel i-7 (2600)
code:
// Node creation
Image *A=&img1;
Image *D=&dst;
// Source nodes
SrcNode *in1=new SrcNode();
in1->Init(A);
//
Scalar nLevels(256);
Scalar lowerLevel(0);
Scalar upperLevel(256);
HistogramNode *hgNode = new HistogramNode();
hgNode->Init(nLevels,lowerLevel,upperLevel);
Store *hgStoreNode = new Store(1,sizeof(int)*256);
DstStoreNode *out= new DstStoreNode();
out->Init(hgStoreNode);
Graph *g = new Graph();
g->Add(in1);
g->Add(hgNode);
g->Add(out);
g->Link(0,0,1,0);
g->Link(1,0,2,0);
g->Compile(img->width,img->height);
g->Execute();
int *histo;
histo=(int*)hgStoreNode->BufferPtr();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have tested it for lena.jpg, camra.jpg, woman.jpg.
Test Platforms:
1. Intel P4
2. Intel dual-core
3. Intel i-7(2660)
Sample code:
//Node creation
Image *A=&img1;
Image *D=&dst;
// Source nodes
SrcNode *in1=new SrcNode();
in1->Init(A);
///
Scalar nLevels(256);
Scalar lowerLevel(0);
Scalar upperLevel(256);
HistogramNode *hgNode = new HistogramNode();
hgNode->Init(nLevels,lowerLevel,upperLevel);
Store *hgStoreNode = new Store(1,sizeof(int)*256);
DstStoreNode *out= new DstStoreNode();
out->Init(hgStoreNode);
Graph *g = new Graph();
g->Add(in1);
g->Add(hgNode);
g->Add(out);
g->Link(0,0,1,0);
g->Link(1,0,2,0);
g->Compile();
g->Execute();
int * histo=(int*)hgStoreNode->BufferPtr();
Test Platforms:
1. Intel P4
2. Intel dual-core
3. Intel i-7(2660)
Sample code:
//Node creation
Image *A=&img1;
Image *D=&dst;
// Source nodes
SrcNode *in1=new SrcNode();
in1->Init(A);
///
Scalar nLevels(256);
Scalar lowerLevel(0);
Scalar upperLevel(256);
HistogramNode *hgNode = new HistogramNode();
hgNode->Init(nLevels,lowerLevel,upperLevel);
Store *hgStoreNode = new Store(1,sizeof(int)*256);
DstStoreNode *out= new DstStoreNode();
out->Init(hgStoreNode);
Graph *g = new Graph();
g->Add(in1);
g->Add(hgNode);
g->Add(out);
g->Link(0,0,1,0);
g->Link(1,0,2,0);
g->Compile();
g->Execute();
int * histo=(int*)hgStoreNode->BufferPtr();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Need to use HistogramStore object instead of Store object for correct histogram accumulation. That why you observe wrong results in multi core environtment.
Igor S. Belyakov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Igor,
We tried it using HistogramStore object. It's working fine.
We tried it using HistogramStore object. It's working fine.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page