Tham khảo tài liệu 'biosignal and biomedical image processing matlab-based applications muya phần 9', ngoại ngữ, anh văn thương mại phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Filters Transformations and Registration 311 dimension of the output is the sum of the two matrix lengths along that dimension minus one. Hence if the two matrices have sizes I1 M1 N1 and h M2 N2 the output size is I2 M1 M2 - 1 N2 N2 - i .Ifshapeis valid then any pixel evaluation that requires image padding is ignored and the size of the output image is ic M1-M2 1 N1-N2 1 . Finally if shape is same the size of the output matrix is the same size as I1 that is I2 M1 N1 . These options allow a great deal in flexibility and can simplify the use of two-dimensional convolution for example the same option can eliminate the need for dealing with the additional points generated by convolution. Two-dimensional correlation is implemented with the routine imfiiter that provides even greater flexibility and convenience in dealing with size and boundary effects. The calling structure of this routine is given in the next page. I2 imfilter I1 h options where again I1 and h are the input matrices and options can include up to three separate control options. One option controls the size of the output array using the same terms as in conv2 above same and full valid is not valid in this routine . With imfilter the default output size is same not full since this is the more likely option in image analysis. The second possible option controls how the edges are treated. If a constant is given then the edges are padded with the value of that constant. The default is to use a constant of zero . standard zero padding . The boundary option symmetric uses a mirror reflection of the end points as shown in Figure . Similarly the option circular uses periodic extension also shown in Figure . The last boundary control option is replicate which pads using the nearest edge pixel. When the image is large the influence of the various border control options is subtle as shown in Example . A final option specifies the use of convolution instead of correlation. If this option is activated