Atitit. thumb generate high-quality thumbnails php. net c ++ java, atitit.thumb.net
Atitit. java thumb generates high-quality thumbnails php. net c ++
1. image scaling --- smoothness and sharpness 1
2. Image Scaling Principle and opencv processing method 1
3. Nearest neighbor interpolation (simple, not recommended) 2
4. bilinear interpolation 3
5. cubic convolution interpolation 3
6. java-image-scaling is an open source high-quality image thumbnail Class 4
7. Thumbnailator Baidu 8 w 4
8. Jmagick thumbnail generation components and documentation (jni) 5
8.1.1. Skip hop 5
9. atiThumb 5
10. Refer to 6
1. image scaling --- smoothness and sharpness)
It refers to the process of adjusting the digital image size. Image Scaling is an extraordinary process. We need to weigh the processing efficiency and the smoothness and sharpness of the results.
When the size of an image increases, the visibility of the pixels that constitute the image will become higher, making the image "soft ".
Conversely, narrowing down an image will increase its smoothness and clarity.
Interpolation Algorithm for amplification and median Algorithm for reduction
Small distortion, but complicated algorithms, such as double three interpolation; some operations are small, but the resulting image distortion is large, such as nearest neighbor interpolation and bilinear interpolation.
The larger the image scale-out ratio, the more obvious the pixel jump, and the higher the interference. Therefore, low-pass filtering must be used to remove high-frequency interference to avoid image distortion. In fact, when we process it, we will perform both anti-transformation and filtering.
Author: old wow's paw Attilax iron, EMAIL: 1466519819@qq.com
Reprinted please indicate Source: http://blog.csdn.net/attilax
2. Image Scaling Principle and opencv Processing Method
The cvResize function prototype provided by OPENCV.
/*************************************** **************************************** *********************/
Image size conversion
Void cvResize (const CvArr * src, CvArr * dst, int interpolation = CV_INTER_LINEAR );
Src
Input image.
Dst
Output image.
Interpolation
Interpolation Method:
CV_INTER_NN-nearest neighbor interpolation,
CV_INTER_LINEAR-bilinear interpolation (used by default)
CV_INTER_AREA-use the pixel relationship for re-sampling. When the image is reduced, this method can avoid ripple. When the image is enlarged, it is similar to the CV_INTER_NN method ..
CV_INTER_CUBIC-cube interpolation.
The cvResize function changes the size of the image src to the same size as that of dst. If you set the ROI, the function supports the ROI as usual.
/*************************************** **************************************** *********************/
3. Nearest neighbor interpolation (simple, not recommended)
The simplest image scaling algorithm is the nearest neighbor interpolation. As the name suggests, the pixel value of each point in the target image is set to the nearest point in the source image. Assume that the width and height of the source image are w0 and h0, and the width and height of the scaled target image are w1 and h1, respectively.
There are many algorithms to zoom in the image by two times. The simplest method is neighbor interpolation, that is
Figure 1 Original Image
An original pixel is copied and mapped to the extended four pixels in an intact manner:
This method preserves all the information of the original image while enlarging the image, but produces a phenomenon of sawtooth.
Neighbor sampling and interpolation are easy to scale and fast, but the scaled image quality is usually poor (especially for characters and scenes ),
The scaling of the image is obviously jagged. The secondary or higher interpolation is helpful to improve the scaling effect;
4. bilinear interpolation
Linear interpolation means that if a (or several) new values are inserted between a1 and a2 during amplification, a = a1 * r + a2 * (1-r) 0 <r <1.
Bilinear is linear interpolation in both the x and y directions.
Cube is to replace this formula with three polynomials, which will produce smoother results.
Bilinear interpolation is the default Image Scaling Algorithm Used in OpenCV. Its effect and speed are both good. The results are also relatively stable, and the computing complexity is not too high.
"In the bilinear interpolation amplification algorithm of the image, the new pixel value in the target image is, the value of four neighboring pixels in the 2*2 area near the source image is calculated by weighted average. After the bilinear interpolation algorithm is enlarged, the image quality is high and the pixel value does not appear discontinuous. However, the secondary algorithm has a low-pass filter, which damages the high-frequency components. Therefore, the image contour may be blurred to a certain extent ."
The image scaled by quadratic linear interpolation is often blurred (called low-pass filtering), especially in amplification.
Use cubic convolution interpolation to improve the interpolation result. cubic convolution interpolation considers the color of 16 points (4x4) around the ing points.
Calculate the final mixed color ,;
The effect of bilinear interpolation is smoother than that of domain interpolation for enlarged images, but it makes the image blurred and there is still a part of the Sawtooth phenomenon.
But to reduce it, bilinear interpolation is slow, and the effect is poor (the effect should be the same as that of another near point interpolation .)
5. cubic convolution interpolation
Double three interpolation is better than bilinear interpolation.
The hq2x algorithm or similar scaling algorithm is the best algorithm for low resolution or low-color (usually from 2 to 256 colors) image enlargement. These algorithms generate acute edges and retain a large number of details. The effect is as follows:
For the Scaling Algorithm of photos (as well as images with many color levels), see a back-tooth algorithm called supersampling. [1] If yes
If the algorithm is enlarged... It's just that interpolation is not enough. We need to reverse the interpolation.
You can try the cubic convolution method, but it is slower than bilinear interpolation, and the effect is certainly better.
Bilinear interpolation only refers to the surrounding four points. The cubic convolution method refers to the surrounding 16 points, and there is no low-pass effect during the operation. If you do not care about the speed, you can consider it.
If
6. java-image-scaling is an open-source high-quality image thumbnail class.
Using imagescaling to generate thumbnails Java image scaling is an open-source project for high-quality image scaling.
Baidu has found about 195 results for you.
The effects of ava-image-scaling are similar .. For details, see java thumbnails-Cool. htm.
7. Thumbnailator Baidu 8 w
Thubnalatyor
But this
Thumbnails. of (dir + "\ all_r1_c2.jpg"). scale (0.70f). outputQuality (1f)
. ToFile (dir + "\ all_r1_c2_min3.jpg ");
However, this effect also seems to be problematic ..
640 width of the source image .. Smooth face after shrinking .. But the third party, the third party, cannot go lan...
8. Jmagick thumbnail generation component and documentation (jni) in hop)
(09:05:39)
Reprinted token
8.1.1. href = "http://search.sina.com.cn /? C = blog & q = skip hop & by = tag "Skip hop |
Category: Technical Talents |
By default, image store uses javax. imageio. ImageIO to generate image thumbnails. You can also use the ImageMagick component to generate thumbnails.
Click the following link to download the components and documentation ImageMagick components and documents 1. Install ImageMagick- |
This Matta guo.
9. atiThumb
Interpolation algorithms are required. Download the following two classes: Skip hop .. |
Lin Ba, I still use atithumb... suprise,... this effect is good ..
Prj. WechatAdm4prpt
JavaImageIOCreator creator = new JavaImageIOCreator (dir );
Creator. crteteThumbnails (dir, 0.6f );
Private void crteteThumbnail (String f1, String f2,
Float scallPercet ){
10. photoshop uses the Scaling Algorithm and calls ps for scaling.
Ps algorithms are integrated with several advanced algorithms in a centralized manner, which is very effective and not open-source .. We recommend that you use the gui interface to call the ps function to zoom in and out .. If there is an api, it would be better. Reply
11. Reference
Java uses Thumbnailator to operate images-kunkunkong263 column-blog channel-CSDN.NET.htm
Generate high-definition thumbnails for Alibaba hop-technology exchange zone-Technical Support forum for Alibaba Cloud online store-Powered by Discuz !. Htm
Image Scaling Algorithm and Speed Optimization-ingress log-. .htm
Scale down an image
Computing Method of digital image scaling technology today _ sunny_xinlang blog .htm