Skip to content

JackingChen/Image_Filtering_and_Hybrid_Images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JackChen (104061563)

Project 1 / Image Filtering and Hybrid Images

Overview

The project is related to

hybrid image

Implementation

  1. zero padding (I use mirror padding method)

    • Example(I only domenstrate lefttop and left side): %lefttop for i=indexbase_c:-1:1 for j=indexbase_r:-1:1 img_pad(j,i)=img_g(indexbase_r-j+1,indexbase_c-i+1); end end %left for i=indexbase_c:-1:1 for j=indexbase_r:rows img_pad(j,i)=img_g(j-indexbase_r+1,indexbase_c-i+1); end end result :
  2. convolution tmp_val=filter.*img_pad(start_r-floor(indexbase_r/2):start_r+floor(indexbase_r/2),start_c-floor(indexbase_c/):start_c+floor(indexbase_c/2));%multiply selected area on the image and the filter value=sum(sum(tmp_val)); output_tmp(j,i)=value;

    explanation: I used matrix multiplication to multiply selected window of the original picture and the filter. Then I used sum() funciton to add the value up. At last, assign the value to a new matrix.

  3. Repeat mirror padding and convolution for three dimentions

Installation

Results

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published