Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Compression with black margin

jboaz123
Beginner
669 Views

Hi,

I am trying to find a probelm source.

I make lossless compression for a grayscale 16 bit image.

First imagerow pixels valuesare zero.

Problem is that when I open thecompressed image with Rubo viewer or Osiris I get corrupt result.

In case first pixel of the first row isn't zeroresult is ok.

It mean that the source of the problem can be the IPP compression module orthe DICOM viewers I use.

Can anyone check the IPP side.

10x

0 Kudos
11 Replies
Sergey_Ryadno
New Contributor I
669 Views

Hi,

What version of IPP and sample package do you use?

Can you attach here this image - best variant is one image before compression and one after. it wil be very helpfull in the invistigation of this issue. Because i can`t reproduce problem in my own pictures.

0 Kudos
jboaz123
Beginner
669 Views

IPP version I use is 6.1.2.041

Please see attached files:

BufferBeforeCompression is a dump of a buffer before compression done.

After.jpg is the compressed file, this file open correctly using the picnic.

Compress.dcm file is the compressed dcm file, image open corrupt using osiris or rubo viewer. picnic fail to open this file.

10x

0 Kudos
Vladimir_Dudnik
Employee
669 Views

Hi,

Assuming you obtain After.jpg file with UIC codec and it seems to be generated ok, the natural question is what tool did you use to generate this DICOM file? Are you sure it was created correctly?

Regards,
Vladimir

0 Kudos
jboaz123
Beginner
669 Views

Hi,

Generate DICOM file done using mergecom DICOM engine.

Problem is that in case I compress an image thatthe first row pixels values are zero, the DICOM viewers I use display the image corrupt and in case first row pixels values aren't zero then image display correctly.

I think thatfact that the picnic open After.jpg file correctly doensn't say that file generated correctly because there is an option that the IPP encoder/decoder make different job from other jpeg decoders.

Can you find why picnic fail to open this dcm file?

Regards,

Boaz

0 Kudos
Vladimir_Dudnik
Employee
669 Views

Hi Boaz,

we can check of course. Most probably it is due to some unsupported DICOM tag. The DICOM parser we use in picnic application is very simple in terms of supporting all DICOM file format features.

Regards,
Vladimir

0 Kudos
jboaz123
Beginner
668 Views

Thank you.

I re-check it and I can tell that corruption occur in the DICOM viewers I use only in case firstimage row pixels values are zero.

In order to increase corruption it better to zero first two image rows pixels values.

In case I zero pixels for other image row corruption not occur what strengthen that problem is with the IPP encoder.

Can youtest IPP jpeg encoding with other jpeg decoder except IPP decoder (you can use After.jpg file for that)?

Please advice.

10x

0 Kudos
jboaz123
Beginner
668 Views

Hi,

I fix problem that the picnic fail to open attached dcm file, so you can see Compress.dcm file again.

Picnic display compress.dcm correctly but other viewers display this file corrupt.

0 Kudos
Vladimir_Dudnik
Employee
668 Views

Are you saying that compressed image you put in Compress.dcm file is compressed by IPP JPEG encoder? I'm not aware of how mergecom tool works, so if it capable to take a compressed JPEG file and put it into DICOM format without recompression then we may need to check our encoder. Otherwise I do not see what we can check on our side.

Vladimir

0 Kudos
jboaz123
Beginner
668 Views

Compress.dcm file compressed by IPP encoder and the dcm file created by mergecom DICOM engine.

mergecom DICOM engine set IPP compression buffer result as the pixel data value in the dcm file.

0 Kudos
Sergey_Ryadno
New Contributor I
668 Views

hijboaz123,

I tryed to open compress.dcm with different application and didn`t see any problem with it. I opened it with XnView and ViewMed - see attached files. May be the reason of corruption you see is algorithmthat usesRubo viewer or Osiris for converting from 16bit->8bit to display on screen?

0 Kudos
jboaz123
Beginner
668 Views

Hi sryadno,

Corruption occur due to a bug in the Rubo viewer.

Thank you for your assistance.

0 Kudos
Reply