# Tag Info

16

You can use a standard inpainting algorithm. These algorithms replace marked pixels in an image with the pixel values that surround these marked pixels. The challenge here is to detect the grid (my tests seem to show that it is not a completely regular grid). So, I came up with this solution: from PIL import Image import requests from io import BytesIO ...

10

The composition below shows a fractal kind structure of the pattern. The every next picture is the result of averaging over each 2x2 pixels block of the previous one. The total character of the pattern remains the same but the image contrast is gradually decreasing. As it was said right earlier, the picture becomes grey when we zoom out. But using the ...

9

Actually, it's kind of the other way around. If you reuse the same JPEG encoder at the same quality level (without any smoothing steps as built-in prepcosessing) and a decoder which faithfully decompresses the images, I expect the image quality not to degrade from generation to generation. This is because quantization (the lossy part) is done the same way ...

8

I don't think that repeated jpg compression reduces to a single flat color. I tried compressing-decompressing an image 3 times. (Using GIMP 2.8.2, at quality level "10%" with progressive, exif, thumbnail and xmp all turned off, 4:2:2 vertical subsampling and integer DCT.) All three images are identical (Linux cmp turns up no differences at all between the ...

6

From the images you posted its quite clear that the image has been downsampled and re-compressed with lower quality jpeg settings. If you look round the mouth you can clearly see JPEG-like artefacts.

5

JPEG projects $8\times 8$ blocks of images onto $64$ 2D cosine patterns: The one in column $1$ and row $5$, once quantized, may look like your hamburger. Luminance and chroma components may get different subsampling patterns. I suspect that the low varying background is nearly horizontal, and due to the different processing steps, it ends up with a mid-...

4

Neither. A true compression ratio is: "original file size in bits" divided by "compressed file size in bits". A practical (based on disk limits) compression may embed the chunk size effect: "original file size in number of chunks" divided by "compressed file size in chunks", less favorable. Some of the main reasons for "neither" are: DCT is not the ...

4

All images blocks that are applied by DCT matrix have a valid IDCT - i.e. they can always bring back original pixels and in general inverse transfer is theoretically as well as computationally viable. However, while your pixels have values in range 0-255 - the DCT matrix of the block never results in values which are confined between 0-255. Not only that, ...

3

Well, $8\times 8$ is simply 64 individual values. Now, if you had a quantization matrix $Q$ (dimensions $8\times 8$) with all $1$s, you'd have 8 bit to spend on every entry in your DFT, so that's $$(256)^{8 \times 8}=({2^8})^{(8 \times 8)} = 2^{512}$$ possible different DFTs. Now, typically, that's not happening, since quantization matrices restrict ...

3

I tried a really simple algorithm of running a 3x3 median filter on the R and G channels of that image and it works quite well. The python code is really simple: import scipy.signal as sp from scipy import ndimage image = ndimage.imread('Ahrnl.jpg', flatten=False) image_filtered = np.array(image) for i in range(2) : image_filtered[:,:,i] = sp.medfilt2d(...

3

The filling is performed to the right ($[1\,,1\,,3\,,x_1\,,x_2\,,x_3\,,x_4\,,x_5]$) or the bottom ($[1\,,1\,,3\,,y_1\,,y_2\,,y_3\,,y_4\,,y_5]^T$), line by line or column by column. The extended values, as far as I know, are not fixed, and they depend on the encoders choices. Remember that blocks are formed on luminance/chrominance transformed images, after ...

3

A rectangular window of data can have a discontinuity between the front and back edge. An FFT of that window represents that circular edge discontinuity with energy in a bunch of high frequency bins. Take that segment of signal and mirror it around one edge. Note that a circular or periodic extension of this no longer has a discontinuity across the edge. ...

2

Unlike DFT, DCT outputs real (non-complex) coefficients. This allows to have smaller outputs (no phase should be stored). Furthermore, it corresponds to a special type of boundary conditions in the DFT that is easily handled by implementations: symmetric signals. This makes 2 arguments in favor of the DCT. Like DFT, DCT produces outputs with few significant ...

2

Here is another approach gaining RGB Brownian noise (4096x4096 GIF).

2

Random noise indeed compresses very poorly. You can produce it in color by generating independent R, G, B values. Looking from a distance will indeed wipe away the noise (by lowpass filtering), and you can avoid that by generating noise images at different resolutions, i.e. using bigger and bigger pixels, and superposing them. When adding the images, you ...

2

Let me share the pattern that has a very flat spectrum (like the white noise). So this pattern is very hard to compress with JPG. The sample image below is enlarged 4 times. The pattern itself is regular, but non-periodic, and could be easily generated by the deterministic algorithm. It also has a fractal property. Viewed from far away:

2

What if image dimension not a multiple of 8?How padding works? If the image width and height are not multiple of 8, the image will be padded with zeroes most commonly.. How 8*8 blocks are chosen The image will be split into 8*8 blocks starting from the first pixel.

2

ImageMagick's "identify -verbose" says it's JPEG. The sample image here has quality 77, while several recent ones of mine that I checked just now have either "quality 71" or "quality 74". All of them have 2x downsampling of the chroma channels. Most of the time I have uploaded high-quality (IJG quality 92) JPEGs without donwsampling. Some have Facebook's "...

2

Compression ratio is $$\frac{N_{uncomp}^b}{N_{comp}^b}$$ where ${N_{comp}^b}$ is the total number bits requried to represent those $3$ pixels $A$,$B$, and $C$ while ${N_{uncomp}^b}$ is the total number of bits required when they are not compressed. Based on your claims, assuming that, those three pixels had $8$ levels with fixed length coding (FLC) of $3$ ...

2

Take a standard R-G-B coded 24-bit image. First, suppose that all channels are coded independently. If by chance, R, G, and B are equal, each one will be converted to the same JPEG file with size $s$. But such an image would be visually grayscale. The corresponding JPEG compression of the grayscale would be about 3 times smaller (taking headers, etc. into ...

2

The picture you've posted most certainly didn't come directly from the image sensor – it was processed by the camera hardware, and software; it's pure dark grey. Anyway; JPEG (to be more specific: JFIF as the JPEG-carrying file format) is not zero overhead, and you can expect a couple kB for this kind of image to work. There's a couple bytes of headers (...

2

JPEG standard will not care about how an image was generated; rather it looks for their block based statistical properties reflected in their quantized DCT coefficients. Under the same compression settings and the same image information, the same output will be produced. As Marcus has stated, the size is pretty ok even for such a whole zero image. Consider ...

2

Those 2D cosine functions are independent of your input image. They are just "cosine waves", or the 64 basis functions that yield 64 coefficients when transforming "$8\times 8$" blocks. Given a $D$ $8\times 8$ matrix for the DCT-II, and a $8\times 8$ image patch $I$, you'll get $64$ coefficients $C$ by: $$C=DID^T$$ [EDIT] If you want to display the 2D DCT-...

2

Image processing is mostly done on frames. The digital image frame is a rectangular raster of pixels, either in an RGB color space or a color space such as YCbCr. So, as you noticed, you can be sure that your compressed images are decoded to rectangular rasters in your application. Each encoded image file stores with its data the source bitmap size (width ...

2

Decoding is sometimes another word for uncompressing. Compression used to be called "source coding" (in comparison to channel coding). For images compressed at a single resolution, like in the baseline JPEG, finally-decompressed images have the same size as the original, as already answered. This might not be the case with multiresolution coder ...

1

Pursuing on @OlliNiemitalo, JPEG allows some loss related to frequency quantization. So any file can be compressed to any size, hence you cannot maximize a JPEG size without setting some constraints, like quality. Let us assume a standard metric, like mean-squared error. Now, let us check some of the JPEG features for image sparsification, and let us try to ...

1

For TIFF, one could use different compression formats such as: LZW (makes a png-like size), JPEG (makes a jpeg size) or no-compression (like bmp). Therefore I will look into the compression techniques rather than TIF format. Jpeg is a compressed image format. In a couple words, it cleverly reduces the high frequency components which do not explain much of ...

1

JPEG compression basically consists of a DCT transform followed by quantization. Hint #1: Hint #2: Now put together your answers to these two hints, and you should be able to answer your own question.

1

Your problem here is twofold: Image Noise / low SNR due to darkness problems to average things out due to JPEG compression The first point is something we cannot really change per se; your averaging approach surely is a good one. The second problem now is due to how the JPEG compression works in your camera: Gamma correction is applied to the RGB image ...

1

There is no objectively correct answer, there are too many variables to consider such as the nature of the image you are compressing (how much entropy/how 'compressible'?), how much you would need to reduce the jpeg quality to achieve the desired filesize etc... If it is possible to use a lossless compression format then I would consider that as a solution. ...

Only top voted, non community-wiki answers of a minimum length are eligible