Skip to main content

Questions tagged [jpeg]

JPEG is a lossy image compression format, suitable for photographs and other natural images. It attempts to compress the image while retaining its visual appearance, while allowing the compressor to trade image quality for file size.

Filter by
Sorted by
Tagged with
2 votes
4 answers
490 views

Why does MP3 use modified DCT?

I read on Wikipedia MP3 that the MP3 standard uses a modified discrete cosine transform. Why does it use a modified transform and not the original DCT like the JPEG standard? Are there reasons ...
Weier's user avatar
  • 181
0 votes
0 answers
45 views

Discrete cosine transform and histogram equalisation

I found an image hash library for python and this blog In the block Getting Funky With pHash, the author writes: Further reduce the DCT. This is the magic step. Set the 64 hash bits to 0 or 1 ...
Albert Nagapetyan's user avatar
0 votes
1 answer
122 views

Measurement of blocking artifacts in images

I want to define a threshold for maximal blocking artifacts in an image. What is a good key value to measure blocking artifacts? I have no reference image non natural image Example: I looked into ...
bananaconda's user avatar
2 votes
2 answers
520 views

What happens when you read and save the same JPEG image again over and over?

This question is mostly related to jpeg compression and expected results when you read and save the same jpeg file several times. Let's say you have read an uncompressed image (originally it has never ...
Ozcan's user avatar
  • 264
0 votes
2 answers
118 views

Why doesn't JPEG file format follow indexed color technique?

This is table about "Image file formats supporting indexed color". I don't see JPEG file format in this table. Why doesn't JPEG file format follow indexed color technique?
Sammy Matt's user avatar
2 votes
3 answers
567 views

jpeg compression: necessity of dividing input image into 8x8 blocks

For jpeg compression, is it necessary to divide the input image into 8x8 blocks and perform a DCT on each of the 64 blocks? If your input image is mxn, could you just have 1 mxn DCT coefficient matrix?...
rg_bjj's user avatar
  • 21
2 votes
0 answers
91 views

JPEG-LS: How to pick T1, T2 and T3 preset coding parameters?

I am reading ISO/IEC 14495-1 : 1999 (E). Under section C.2.4.1.1 JPEG-LS preset coding parameters, one can find the valid values ...
malat's user avatar
  • 164
0 votes
0 answers
59 views

Intuition for feeding output from 'row' DCT in to 'column' DCT for JPEG

This question is motivated by 23:00 in this video. It shows how the output from 'row' DCT is fed in to 'column' DCT for JPEG, and shows this image (highlights are mine): In the top 'Rows' row my ...
davetapley's user avatar
2 votes
2 answers
2k views

Understanding gain of the DCT transform

I have been reading the guide from: JPEG Huffman Coding Tutorial I eventually reached the point where it states: Finally, we want to convert the DCT DC value to an RGB value. Assuming that the gain ...
malat's user avatar
  • 164
0 votes
1 answer
130 views

Perfect lossless rotation of JPEG image (ITU 81)

JPEG image compression is Fourier based DCT (ITU 81). It divides the image into 8x8 pixel blocks, and processes each using a Discrete Cosine Transform. The results are quantised and then encoded. ...
malat's user avatar
  • 164
2 votes
2 answers
801 views

What is facebook's image compression algorithm?

For a project I'm working on (master thesis), I need to figure out what is facebook's image compression algorithm. The goal: to be able to mimic facebook's image compression locally (using python). ...
user2679262's user avatar
1 vote
3 answers
369 views

Does decoding jpeg images uncompresses them?

I train a convolutional neural network on compressed jpeg images. I noticed that my code takes pretty much the same amount of space in memory whether I use high quality jpeg images or the same jpeg ...
S.E.K.'s user avatar
  • 165
2 votes
3 answers
564 views

How Does Color Conversion and Downsampling work When JPEG compressing a grayscale image?

For color images I know you have to convert to YCbCr format, and then for downsampling is based on the fact that human beings see differences in Y more than differences in Cb or Cr. How do I do these ...
Coder Motor's user avatar
0 votes
0 answers
738 views

Need 600dpi JPEG file smaller than 5MB

In order to submit a document to an online website, they require the following: Scan the US letter-size hard-copy document at 600 dpi in greyscale Provide a JPEG, JPG, or PNG file of the scan with a ...
TCB in Delaware's user avatar
1 vote
2 answers
1k views

DC Coefficient of JPEG Block

Suppose I take a grayscale image and break it into 8x8 pixel blocks, then take the DCT of those blocks. What is the DC coefficient of the block in relation to the whole image? To simplify I'm ...
Fritz17236's user avatar
3 votes
2 answers
2k views

DCT - Coefficients and Basis Function

I am trying to understand how the Discrete Cosine Transformation works but I am not sure if I am at the right road. Assuming that I have an $8\times8$ pixels image and I am applying the DCT to this ...
Theof's user avatar
  • 51
3 votes
1 answer
621 views

What are the cosine functions in JPEG's DCT-II table?

As I understand it from this video, in a JPEG image an 8x8-pixel block is made up of weighted cosine waves, calculated using DCT-II. There are lots of visualizations of these waves, such as this one ...
JeffThompson's user avatar
3 votes
0 answers
596 views

How do 2D DCT basis functions interact to produce 8x8 JPEG tiles?

This section is a bit of an intro. If you want to skip directly to where the problem is explicitly outlined, skip to the bottom of this post. Please note that I'm not hip with mathematical lingo, so ...
jodediah holems's user avatar
1 vote
0 answers
400 views

Blocking effect after reconstructuring the image. Jpeg compression [closed]

The image is splitted into 8x8 blocks each of which are processed through DCT, quantization, huffman encoding/decoding, dequantization and inverse dct and used to recontruct the image. But there is a ...
Thunfische's user avatar
2 votes
2 answers
465 views

JPEG compression steps after quantization

I have a 3-channel (for colours) a png image that I opened and I splitted the image into 8x8 blocks I applied all of the blocks discrete cosine transform And then applied quantization I stored the ...
Thunfische's user avatar
0 votes
1 answer
140 views

Is this jumbled image due to difference between Matlab and Python slicing?

When I import an image from Matlab I get the following jumbled image rather than the (224x224x3 RGB) image of a single elephant I expected I write the image from Matlab as a binary file ...
moloned's user avatar
  • 103
1 vote
1 answer
988 views

JPEG: In image compression why are higher frequency components divided by a larger number during quantization

Once 2D FDCT has been carried out on 8x8 blocks of the image data, the coefficients are quantized. This involves use of a quantization matrix where we simply divide each FDCT coefficient by the ...
quantum231's user avatar
3 votes
2 answers
62 views

How Can JPEG Be Used to Realize a Transfer Application with a Fixed Bit Rate? [closed]

For simplicity, assume a fixed bandwidth (5MB/s) and that each second an image with 12MP is generated. The quality of the image ...
user36526's user avatar
4 votes
3 answers
364 views

Do JPEG formats add significant overhead?

For an extreme example, I have the following image that was a JPEG before stackexchange converted it to a PNG:- Before you perform all sorts of funky image processing tricks on it, it's just a black ...
Paul Uszak's user avatar
1 vote
2 answers
103 views

number of cosine waves in DCT

Why is it $N\cdot N$ a sufficient number of cosine waves equal to the size of the image or to a portion of it to describe it (or a portion of it) completely without losing information applying the DCT....
smark's user avatar
  • 13
2 votes
1 answer
1k views

Image not divisable by 8? (JPEG Compression)

I have learned that an image is to be divided by 8*8 blocks, and the 2D DCT is then applied to these blocks. My question is, what if the image is not divisible by 8? What should I do in this case?
Bonavia's user avatar
  • 109
1 vote
0 answers
206 views

How to remove artefacts from this image?

There is some vertical banding near the tree trunks in the following image. Is there a way remove this type of artefact, preferably using Mathematica?
M.R.'s user avatar
  • 111
2 votes
2 answers
449 views

What pattern maximises a JPEG file's size? [duplicate]

As I understand the JPEG algorithm, it smooths (ignores) gradual variations in colour and brightness in favour of high frequencies. This loss of information is what creates the characteristic high ...
Paul Uszak's user avatar
0 votes
1 answer
583 views

Confirming what a compression ratio is

I have looked at various sources, but still have not been able to answer the question: what is compression ratio? I have come to the understanding that this is the definitive answer: compression ...
TheTank's user avatar
  • 113
3 votes
1 answer
593 views

compression ratio of pixels block

I am new to image compression topic and really appreciate it if someone could help me understand how compression rati works in this case. Assuming I have JPEG lossless coder that encodes the following ...
Harry's user avatar
  • 31
2 votes
1 answer
823 views

YCbCr to jpeg-YCbCr

Im sampling an image in YCbCr from an ov7670 camera and using jpegant library to encode a jpeg file. Whenever I do it directly using Y,Cb,Cr values from my camera, I get a pink-violet version of the ...
Eraclea's user avatar
  • 23
0 votes
0 answers
252 views

How doesn't JPEG huffman table contain 256 codes?

Here are the DHT entries I got from JPEG snoop: ...
quantum231's user avatar
2 votes
2 answers
2k views

How does Jpeg encoding affect the final file size of 24BPP RGB and 8BPP grayscale image?

The reason I'd like to know this is because of a file size problem. I am trying to reduce an image's file size from converting it from TIFF to JPEG. A user challenge me that he notice a RGB TIFF image ...
Jacky Cheng's user avatar
5 votes
1 answer
332 views

Does every 8 by 8 DCT matrix have a valid (in range) IDCT?

For a given quantization level of JPEG compression, are all possible DCT matrices have valid IDCTs. By valid, I mean matrices whose elements are in the range [0,255] ?
Su20200's user avatar
  • 111
1 vote
2 answers
345 views

How many 8x8 JPEGs exist with distinct DCT given a quality level?

For a given quality of image (or quality of compression), Multiple 8x8 JPEG images can have the same DCT (Discrete cosine transform) matrix, for a given quality of JPEG compression. I want to find the ...
Su20200's user avatar
  • 111
4 votes
1 answer
452 views

2D DWT computation order

In 2D the discrete wavelet transform (DWT) of an image using lifting based 5/3 filter, if I perform a row-wise operation first then perform column-wise operation then I will get 4 sub-band LL, LH and ...
Pallab Nath's user avatar
8 votes
2 answers
8k views

Which image filter can be applied to remove gridded pattern from corrupt jpegs?

I have around 1,400 jpegs that have been corrupted somehow and have lost the backup images. They all seem to have the same gridded pattern of lines over each (i.e. the gridding does not shift from ...
Stephen E's user avatar
2 votes
1 answer
669 views

In a JPEG file, how much is noise and how much is the image?

I have an IP webcam that generates very low light images of a plain background. The camera spits out JPEG only files. The following is one such frame... and this is with graphic equalisation ...
Paul Uszak's user avatar
5 votes
2 answers
3k views

JPEG DCT padding

Since the JPEG DCT block used is 8x8, how does the method deal with images with dimensions that are not multiples of 8? What kind of padding does it use? How are the 8x8 blocks of the image chosen?
Euhi's user avatar
  • 53
1 vote
1 answer
52 views

What base image size to choose to assist easier downsizing?

Android applications need image at different resolutions to support different screen densities and pixel size. I am planning to provide only one image with high pixel size and let the underlying ...
Ram Shanker's user avatar
12 votes
2 answers
1k views

Why are some JPEG files of the same scene much larger than others?

I'm using a Foscam FI8910W ip camera to view a static scene under constant lighting conditions. When I pull back a frame grab, it's about 35 KB in size. I can do this over and over and it's always ...
Paul Uszak's user avatar
3 votes
1 answer
100 views

What would produce this "hamburger" corruption on images?

I have an image that has gone through an unknown number of jpeg and webp conversions (at least one but more likely 2+). Currently this image is a JPEG and contains corruptions in single color or mild ...
duma's user avatar
  • 131
2 votes
4 answers
292 views

Performing image equalisation and then Jpeg compression

I'm trying to estimate what would be the result of first performing an histogram equalisation on an image, and then compressing it using JPEG. I know that histogram equalisation increases the ...
vondip's user avatar
  • 123
6 votes
2 answers
1k views

Difference between jpg compression and mp3 compression

My understanding of jpg compression is that, if done repeatedly, any image will eventually be reduced to a single flat color, due to the way it deals with neighboring pixels. However, years ago I was ...
qwalter's user avatar
  • 63
0 votes
1 answer
279 views

How to undo the quantization step in DCT?

How can I do point by point multiplication of the quantized DCT coefficients with the quantization matrix before computing the inverse DCT for each block? I want to modify the reconstruction algorithm ...
Mona Jalal's user avatar
10 votes
2 answers
6k views

What is the Compression Algorithm used by Facebook?

I would like to know what is the Compression Algorithm used by Facebook for compressing the images? I uploaded a image of size 242 Kb and I downloaded the same image from my Facebook album. The size ...
Premnath D's user avatar
  • 1,021
3 votes
2 answers
273 views

Usage of Digital Cosine Transform in lossy compression of images

I was reading about Digital Cosine Transform (DCT Type-I) and it's use in JPEG. I have the following doubt. My teacher offered an explanation which wasn't very convincing. What property of Digital ...
Guru Prasad's user avatar
51 votes
10 answers
18k views

What is the least JPG-compressible pattern? (camera shooting piece of cloth, scale/angle/lighting may vary)

I am trying to design a cloth that, from the point of view of a camera, is very difficult to compress with JPG, resulting in big-size files (or leading to low image quality if file size is fixed). It ...
Nicolas Raoul's user avatar
3 votes
3 answers
4k views

Retrieve pixel values from the output jpeg image

I have this jpeg image (abc.jpg) and I change some pixel values of this image and store this on hard disk, to later see the changed the pixel values. The name of the output jpeg image is say, xyz.jpg. ...
Navin's user avatar
  • 31
3 votes
1 answer
398 views

Determining the resulting pixel value before creating a compressed JPEG image

Is it possible to determine the resulting pixel values and modify them before the compressed jpeg image is actually created? For example, I'm at the stage where I already have the quantized DCT ...
Gabriella Alice Karin's user avatar