- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I'm using IPP 6.0.2 with Delphi 2007 and found that IPP floddfill sometimes return strang region (IppiConnectedComp) such as when using ippiFloodFill_Range4Con_8u_C1IR with the image 1000x1000 pixel. Ipp return region as (2010230698, (0, 0, 0), (0, 0, 1000, 1000)) which mean region area = 2,010,230,698 while image size only 1000x1000 (1 channel, 1 byte per pixel)
and sometimes it takes more than 1-5 minutes for flood fill image size (1000x1000) in CPU E2200. When it take long time than usual, it may return region area in minus (such as -1,853,045,006) or in bigger size than real image area, and filled area may be wrong. This often occur when use Min/MaxDelta with high value such as 100 or higher.
How can i fix this? Thanks in advance.
//This is my code. Test image is different color gradient image with 1000x1000 pixel in byte, 3 channel.
roiSize.width := width;
roiSize.height := height;
MinDelta := ifthen(round(fuzzyness*1.28)<=128,round(fuzzyness*1.28),128);
MaxDelta := ifthen(round(fuzzyness*1.28)<=128,round(fuzzyness*1.28),128);
newVal := 0;
seed.x := origx;
seed.y := origy;
ippiFloodFillGetSize(roiSize,@BuffSize);
getmem(pBuffer,BuffSize);
pImageP3[0] := pipp8u(self.red.realPixel);
pImageP3[1] := pipp8u(self.gre.realPixel);
pImageP3[2] := pipp8u(self.blu.realPixel);
ippiFloodFill_Range4Con_8u_C1IR(pImageP3[0],width,roiSize,seed,newVal,minDelta,maxDelta,@Region,pBuffer);
ippiFloodFill_Range4Con_8u_C1IR(pImageP3[1],width,roiSize,seed,newVal,minDelta,maxDelta,@Region,pBuffer);
ippiFloodFill_Range4Con_8u_C1IR(pImageP3[2],width,roiSize,seed,newVal,minDelta,maxDelta,@Region,pBuffer);
//IppiConnectedComp declare as below
IppiConnectedComp = record
area: double;
value: array[0..2] of double;
rect: IppiRect;
end;
I'm using IPP 6.0.2 with Delphi 2007 and found that IPP floddfill sometimes return strang region (IppiConnectedComp) such as when using ippiFloodFill_Range4Con_8u_C1IR with the image 1000x1000 pixel. Ipp return region as (2010230698, (0, 0, 0), (0, 0, 1000, 1000)) which mean region area = 2,010,230,698 while image size only 1000x1000 (1 channel, 1 byte per pixel)
and sometimes it takes more than 1-5 minutes for flood fill image size (1000x1000) in CPU E2200. When it take long time than usual, it may return region area in minus (such as -1,853,045,006) or in bigger size than real image area, and filled area may be wrong. This often occur when use Min/MaxDelta with high value such as 100 or higher.
How can i fix this? Thanks in advance.
//This is my code. Test image is different color gradient image with 1000x1000 pixel in byte, 3 channel.
roiSize.width := width;
roiSize.height := height;
MinDelta := ifthen(round(fuzzyness*1.28)<=128,round(fuzzyness*1.28),128);
MaxDelta := ifthen(round(fuzzyness*1.28)<=128,round(fuzzyness*1.28),128);
newVal := 0;
seed.x := origx;
seed.y := origy;
ippiFloodFillGetSize(roiSize,@BuffSize);
getmem(pBuffer,BuffSize);
pImageP3[0] := pipp8u(self.red.realPixel);
pImageP3[1] := pipp8u(self.gre.realPixel);
pImageP3[2] := pipp8u(self.blu.realPixel);
ippiFloodFill_Range4Con_8u_C1IR(pImageP3[0],width,roiSize,seed,newVal,minDelta,maxDelta,@Region,pBuffer);
ippiFloodFill_Range4Con_8u_C1IR(pImageP3[1],width,roiSize,seed,newVal,minDelta,maxDelta,@Region,pBuffer);
ippiFloodFill_Range4Con_8u_C1IR(pImageP3[2],width,roiSize,seed,newVal,minDelta,maxDelta,@Region,pBuffer);
//IppiConnectedComp declare as below
IppiConnectedComp = record
area: double;
value: array[0..2] of double;
rect: IppiRect;
end;
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reporting about this. Could you please also attach your source image (to help us to reproduce the issue)?
Regards,
Vladimir
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik (Intel)
Thanks for reporting about this. Could you please also attach your source image (to help us to reproduce the issue)?
Regards,
Vladimir
Regards,
Vladimir
here is my test file.
http://www.digitalmaster.co.th/images/1000x1000.jpg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Kittipong Lim
Hello,
Could you please provide exact values of seed and Min/MaxDelta parameters which lead to your problem?
By the way there is ippiFloodFill_Range4Con_8u_C3IR function for colored input image.
Igor.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Igor Belyakov (Intel)
Hello,
Could you please provide exact values of seed and Min/MaxDelta parameters which lead to your problem?
By the way there is ippiFloodFill_Range4Con_8u_C3IR function for colored input image.
Igor.
Hello Igor
I try
seed = (483, 463) //(at this seed RGB = (124,100,100)
newval = 0
minDelta = (100,100,100)
maxDelta = (100,100,100)
roiSize = (1000,1000)
then at the
- red channel. it return region = (197095, (0, 0, 0), (166, 288, 627, 316)). this seem work as it should be.
- green channel, it took CPU time for 3 minutes and return region = (-985044354, (0, 0, 0), (0, 288, 1000, 316))
- blue channel, it took CPU time for 3 minutes and return region = (-985044354, (0, 0, 0), (0, 288, 1000, 316))
Since my app already design to keep the image in planar. So i often use 1c instead of 3c.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Kittipong Lim
Hello Igor
I try
seed = (483, 463) //(at this seed RGB = (124,100,100)
newval = 0
minDelta = (100,100,100)
maxDelta = (100,100,100)
roiSize = (1000,1000)
then at the
- red channel. it return region = (197095, (0, 0, 0), (166, 288, 627, 316)). this seem work as it should be.
- green channel, it took CPU time for 3 minutes and return region = (-985044354, (0, 0, 0), (0, 288, 1000, 316))
- blue channel, it took CPU time for 3 minutes and return region = (-985044354, (0, 0, 0), (0, 288, 1000, 316))
Since my app already design to keep the image in planar. So i often use 1c instead of 3c.
In this case for green and blue chanels newval value is inside pixel's value range [0,200] ([100-minDelta,100+maxDelta]) to be filled. In such cases try to slightly correct min/MaxDelta get newVal out of pixel's value range to be filled.
Igor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Igor Belyakov (Intel)
Hello,
In this case for green and blue chanels newval value is inside pixel's value range [0,200] ([100-minDelta,100+maxDelta]) to be filled. In such cases try to slightly correct min/MaxDelta get newVal out of pixel's value range to be filled.
Igor
Did you mean that if i use minDelta = 128, maxDelta = 128 and seed value = 128 (this should fill every pixel) / or if i use minDelta,maxDelta = 255 .. this function will always return strange region like this since i cant find any newVal out of pixel's value range?
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