Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [img_rows,img_cols,img_bands] = size(fr_in);
- idx = find(fr_in==0);
- [r,c] = ind2sub(size(fr_in),idx);
- temp = cat(2,r,c);
- blocks = zeros(int8(img_rows/sub_blk_size),int8(img_cols/sub_blk_size),img_bands);
- for b=1:img_bands
- for i=1:size(r)
- x = temp(i,1);
- y = temp(i,2);
- blocks(int8(x/5)+1, int8(y/5) + 1, b) = 1;
- end
- end
- miss_subblks = [];
- for r = 1:(img_rows/sub_blk_size)-1
- for c = 1:(img_cols/sub_blk_size)-1
- for b = 1:img_bands
- if blocks(r,c,b) == 1
- miss_subblks = [miss_subblks; [(r-1)*sub_blk_size, (c-1)*sub_blk_size]];
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement