I'm currently working on the lossless JPEG files(not JPEG-LS). It's really hard to find any files to test my application on.
Particulary I need files that contain reset interval markers, multiple DC huffman tables, multiple scenes or comment markers.
Do you know where I could find any lossless JPEG files? Do you yourself have any that you could share?
Thanks in advance, Witek.
EDIT: i could also use DICOM files using this compression standard (tag (0002,0010) Transfer syntax UID = 1.2.840.10008.1.2.4.70)
On the following site you can find a few DICOM lossless JPEG files, in particular with the transfer syntaxes 1.2.840.10008.1.2.4.57 and .70. Consult the Transfer Syntax section for easy identification of which data sets that provide the requested transfer syntax.
There are also a number of lossless JPEG images of different flavors on the NEMA DICOM FTP site. For more detailed information on the various data sets, please consult the README file.
Here's a large collection of dicom sample images: There are some JPEG lossless images among them. Some subfolders have images that are not valid DICOM, but that is usually documented. By the same maintainer there is also this list of links.
Lossless JPEG is most widely used in XA (cathlab) cine images. These are always grayscale, and exist as 8 or 10 bit images.
You could also setup a free PACS like DCM4CHEE or conquest, send it uncompressed images and have them forward the images jpeg-lossless compressed. The advantage of this is that you can create images of different color spaces, bit depths, planar/bypixel, etcetera. Color spaces are interesting: people sometimes make mistakes to transform the color space like for Jpeg lossy, which you should not do.
Most likely none of these images require advanced stuff like restart markers. If you want to check if this works, create bitstreams with the IJG implementation and package them in DICOM.
EDIT: be warned that there are buggy images out there. I am using an implementation based on the IJG code.
Related
I am new to implementation of DDS. I have installed OPENDDS-3.9 as it was open source.
my requirement is to transfer some image files and video files between publisher and subscriber. I couldn't find any sample project regarding this in internet, can any one help to get a sample code for image transfer.
And can I be suggested any other open source DDS which could be useful for my implementation.
Thank you
Rama
To answer your first question: yes, you can transfer images and videos. This, however, is not that trivial. You have to serialize your images into bytes, transmit the bytes and then on the subscriber side transform the bytes back into an image. The same goes for videos.
You may want to take a look at Vortex OpenSlice DDS. This is a free Community Edition of DDS I personally preferred over OpenDDS. For a comparison of DDS implementations, you may want to take a look at this question.
I can read an Image's metadata and find the image quality with the following command in linux, which I think is from ImageMagick:
identify -verbose image.jpg
The output of this command is the following:
...
Iterations: 0
Compression: JPEG
**Quality: 96**
...
The important thing to me is to find which compression factor was used to generate the JPEG file. So, I have questions regarding these metadata:
1- Is the image quality the same as the JPEG compression factor used? if no, how can I find which compression factor was used to compress an JPEG image?
2- Can I do this with matlab?
In Matlab, you can get the value of the quality factor of an image file with imfinfo (see the example).
Edit: However, the Quality is given in the Comment field, which can be filled differently depending on the software(s) that processed / generated your image. A more reliable method for you would be to use your unix command. In Matlab, you can type:
[~,res] = unix('identify -verbose image.jpg');
and res will contain the output from the command line (the exact same than what you obtain with your unix shell). You can then display it or parse it, as you like.
Then, it is also possible to save an image array to a JPG file at a given quality after some processing, with the function imwrite. The command will look like:
imwrite(A,'myFile.jpg', 'Quality', 96);
You can also specify the CodingMethod and the CodingProcess.
So yes, it is possible !
i am new to image-processing in CUDA.
I am currently learning whatever i can about this.
Can anyone tell me what is the appropriate format (extension of image) for storing and accessing image files so that CUDA processing would have the most efficiency.
And y does all the sample cuda programs for image processing use .ppm file format for images.
And can i convert the images in other format to that format.
And how can i access those files (CUDA Code)?
Most image formats are created for efficient exchange of images, ie. on media (hard disk), the internet, etc.
For computation, the most useful representation of an image is usually in some raw, uncompressed format.
CUDA doesn't have any intrinsic functions that are used to manipulate an image in one of the interchange formats (e.g. .jpg, .png, .ppm, etc.) You should use some other library to convert an image in one of the interchange formats to a raw uncompressed format, and then you can operate on it directly in host code or in CUDA device code. Since CUDA doesn't recognize any interchange format, there is no one format that is correct or best to use. It will depend on other requirements you may have.
The sample programs that have used the .ppm format have simply done so for convenience. There are plenty of sample codes out there that use other formats such as .jpg or .bmp to store an image used by a CUDA program.
As you may know, when you record a video on a windows phone, it is saved as a .mp4. I want to be able to access the video file (even if it's only stored in isolated storage for the app), and manipulate the pixel values for each frame.
I can't find anything that allows me to load a .mp4 into an app, then access the frames. I want to be able to save the manipulated video as .mp4 file as well, or be able to share it.
Has anyone figured out a good set of steps to do this?
My guess was to first load the .mp4 file into a Stream object. From here I don't know what exactly I can do, but I want to get it into a form where I can iterate through the frames, manipulate the pixels, then create a .mp4 with the audio again once the manipulation is completed.
I tried doing the exact same thing once. Unfortunately, there are no publicly available libraries that will help you with this. You will have to write your own code to do this.
The way to go about this would be to first read up on the storage format of mp4 and figure out how the frames are stored there. You can then read the mp4, extract the frames, modify them and stitch them back in the original format.
My biggest concern is that the hardware might not be powerful enough to accomplish this in a sufficiently small amount of time.
I'm looking for a format that supports mipmaps, cubemaps and 3d textures for using on a OpenGL ES 2.0 game. On Windows, I was using .dds format because of its support for DXT compression. For mobile programs, I think there are .pkm files which don't supports multiple textures and .pvr files which I 'think' dependent on PowerVR platforms. So;
-Can I use .dds with ETC1 compression? Is there a license issue that prevents me to use .dds on platforms other than Windows?
-Do other GPU vendors' products(Adreno, Mali etc.) support .pvr files? (Not PVRTC, just .pvr with ETC1 compression)
-Or is there another file format that I can use for my needs?
Yes, you can use DDS for ETC1. Just invent your own FOURCC code. As far as I know dds is not patented.
No GPU vendor support pvr file format (including PoverVX). GPU vendors care only about compressed texture data (PVRTC, ETC, DXTC), not about file format (png, jpeg, dds, pvr). It is user/application responsibility to parse file format to extract texture data (compressed or not compressed).
You can use any file format that is good for your needs. Invent your own. For example, like this:
[4 bytes] - width
[4 bytes] - height
[4 bytes] - format id (1 - etc1, 2 - dxt, 3 - ... whatver)
[4 bytes] - count of images (mipmaps/cubemaps/whatever)
[bytes] - data
Or is there another file format that I can use for my needs?
You might want to look at http://www.khronos.org/opengles/sdk/tools/KTX/
and for program to create KTX files http://www.malideveloper.com/texture-compression-tool.php
KTX format support ETC1 compressed textures with mipmaps. It should support also other compression formats, but I don't know other tools that can do it (I've never need it).
Using libktx you can load textures (with mipmaps) from file/memory to GL objects with "single" line of code. Also it can decompress ETC1 textures to GL_RGB while loading .ktx file, if device doesn't support ETC1 (you need to set GLEW_OES_compressed_ETC1_RGB8_texture manually like here)