tailieunhanh - Biosignal and Biomedical Image Processing MATLAB-Based Applications phần 9
Tham khảo tài liệu 'biosignal and biomedical image processing matlab-based applications phần 9', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Fundamentals of Image Processing 281 Generate a single horizontal line of the image in a vector of 400 points Generate sin scale between 0 1 I_sin 1 .5 sin 2 pi x .5 I_8 im2uint8 I_sin Convert to a uint8 vector fori 1 N Extend to N 400 vertical lines I i I_8 end imshow I Display image title Sinewave Grating The output of this example is shown as Figure . As with all images shown in this text there is a loss in both detail resolution and grayscale variation due to losses in reproduction. To get the best images these figures and all figures in this section can be reconstructed on screen using the code from the examples provided in the CD. Example Generate a multiframe variable consisting of a series of sinewave gratings having different phases. Display these images as a montage. Border the images with black for separation on the montage plot. Generate 12 frames but reduce the image to 100 by 100 to save memory. Example and Figure Generate a multiframe array consisting of sinewave gratings that vary in phase from 0 to 2 pi across 12 images The gratings should be the same as in Example except with fewer pixels 100 by 100 to conserve memory. clear all close all N 100 Vertical and horizontal points Nu_cyc 2 Produce 4 cycle grating M 12 Produce 12 images x 1 N Nu_cyc N Generate spatial vector for j 1 M Generate M 12 images phase 2 pi j-1 M Shift phase through 360 2 pi degrees Generate sine scale to be 0 1 I_sin .5 sin 2 pi x phase .5 Add black at left and right borders I_sin zeros 1 10 I_sin 1 zeros 1 10 Copyright Marcel Dekker Inc. All rights reserved. Marcel Dekker Inc. 270 Madison Avenue New York New York 10016 TLFeBOOK 282 Chapter 10 Figure Montage of sinewave gratings created by Example . I_8 im2uint8 I_sin for i 1 N if i 10 I I 90 Convert to a uint8 vector Extend to N 100 vertical lines Insert black space at top and bottom I i 1 j 0 else Copyright Marcel Dekker Inc. All rights reserved. Marcel Dekker Inc. 270 Madison Avenue New York
đang nạp các trang xem trước