Slexy.org is shutting down and stopped accepting new Pastes on May 4th, 2021.
Existing Pastes will stop being available on or after May 10th, 2021.
Author: Not specified Language: matlab
Description: Not specified Timestamp: 2017-10-11 05:01:51 +0000
View raw paste Reply
  1. data=dicomread('assign1_9.dcm');
  2. U=[0,0;0,1;1,0];
  3. X=[0,0;1.2,-0.5;1 3]; %where we are mapping our points
  4. T = maketform('affine',U,X);%affine- shift rotation and scaling
  5. % (affine same as linear transform)
  6. trans_image=imtransform(data,T);
  7. imagesc(trans_image);
  8. colormap('gray');
  9. title('linear transform');
  10. % for a tilt (four points) use projection
  11. U=[0,0;0,1;1,0;2,3];
  12. X=[0,0;1.2,-0.5;1 3;2,4];
  13. T = maketform('projective',U,X);
  14. proj_image=imtransform(data,T);
  15. imagesc(proj_image);
  16. colormap('gray');
  17. title('projection');
View raw paste Reply