Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all; close all; clc;
- OpenfilePath = 'C:\Users\TBL\Documents\MATLAB\1708_AMORE\10_MR\backhand';
- SavefilePath = 'C:\Users\TBL\Documents\MATLAB\1708_AMORE\10_MR\backhand';
- max_step = 500;
- read_file_name = 'Image0001.jpg';
- img = imread([OpenfilePath,'\' ,read_file_name]);
- %img = imread('Image0499.jpg');
- %img = rgb2gray(img);
- %imshow(img);
- [H,W] = size(img);
- %% Parameters setup
- [lm,li] = max(img(5:H,51:W));
- minDepth = min(li)
- maxDepth = max(li)
- %%
- diff = 20; %it was 2
- l_crop = 70;
- r_crop = 1;
- t_crop = 14+minDepth-0.75.*minDepth;
- b_crop = 0.75*(H-maxDepth);
- %b_crop = 2*minDepth;
- %%
- up = H-2;%443
- gsigma = 4;
- down = 222;
- % %% Preprocessing
- [img_crop,H_crop,W_crop] = crop(img,H,W,l_crop,r_crop,t_crop,b_crop);
- % imshow(img_crop)
- % imshow(img_crop)
- %%
- [lm,li] = max(img_crop(:,1));
- [rm,ri] = max(img_crop(:,W_crop));
- li
- ri
- %shif = ri-li;
- %rotDeg = atand(shif/W_crop)
Advertisement
Add Comment
Please, Sign In to add comment