Atitit. javathumb generates high-quality thumbnails for php. netc1. image scaling --- smoothness and sharpness 12. image Scaling Principle and opencv Processing Method 13. nearest Neighbor insertion (simple, not recommended) 24. bilinear insertion 35. cubic convolution plug 36. java-image-
Atitit. javathumb generates a high-quality thumbnail php. netc 1. image Scaling --- smoothness and sharpness 1 2. image Scaling Principle and opencv processing method 1 3. nearest Neighbor insertion (simple, not recommended) 2 4. bilinear insertion 3 5. three convolution inserts 3 6. java-image-
Atitit. java thumbGenerateHighQualityShrinkThumbnailPhp. 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 highQualityImage shrinkingThumbnailCategory 4
7. Thumbnailator Baidu 8 w 4
8. Jmagick reduction in objective hopThumbnailGenerateComponents 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
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
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 interpolation scaling is simple and fast, but most of the time the scaled image isQualityRelatively Poor (especially for characters and scenery ),
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 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. Enlarged image by bilinear inner Interpolation AlgorithmQualityThe pixel value is not consecutive. 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
QualityImage shrinking
ThumbnailClass
Use imagescalingGenerateShrinkThumbnailJava image scaling is a highQualityOpen-source project for Image Scaling
Baidu has found about 195 results for you.
The effects of ava-image-scaling are similar .. For details, see: java contractionThumbnail-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 ..
The original width is 40 .. Smooth face after shrinking .. But the third party, the third party, cannot go lan...
8. Jmagick reduction in objective hop
Thumbnail
GenerateComponents and documentation (jni)
(09:05:39)
Bytes
8.1.1. href = "http://search.sina.com.cn /? C = blog & q = skip hop & by = tag "Skip hop |
Category: Technical Talents |
Javax. imageio. ImageIO is used by default in Skip hop.GenerateImage shrinkingThumbnailYou can also use the ImageMagick component.GenerateShrinkThumbnail
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, I still use atithumb... suprise,... is this 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
Enable skip hopGenerateHD shrinkingThumbnail-Technical exchange zone-Technical Support forum for online shopping malls-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