Image Processing for PAC and whitening exercises

Source: Internet
Author: User

Step 1: Download pca_exercise.zip, which contains 144x10000 of image data. Each column represents a 12x12 image block. First, you can see the following 200 images:

Step 2: Perform 0-means processing to ensure that the mean value of the data is 0 or close to 0.

Step 3: Run PCA to map original data to different feature vectors

Step 4: verify whether the above PCA calculation result is correct. If it is correct, the covariance of the ing data is a diagonal matrix. After visualizing this diagonal matrix, you can see a diagonal line in the rectangle chart with a different color from the background color:

Step 5: find out how many of the first principal components are suitable. Here, we need to retain at least 99% Difference values when using indicators.

Step 6: Dimensionality Reduction: based on the number of principal elements to be retained in the previous step

The above two images: The left side is the PCA data after dimensionality reduction, and the right side is the original data. We can visually see that except for the brightness, the difference is very small in other places.

Step 7: Add regularization items

After PCA and whitening are performed on the data, the diagonal element of the covariance matrix of the data is equal to 1. However, after the regularization parameter is added, all corner elements are less than 1:

The above two images: The normalization parameter is added on the left, and the regularization parameter is not added on the right.

Step 8: zca whitening:

The above two images: The left side is the data after zca whitening, and the right side is the original data. We can see that the edge is more prominent.

 

Image Processing for PAC and whitening exercises

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.