Info
此问题已关闭。 请重新打开它进行编辑或回答。
plz help me to store center values alone in matrix form according to 3x3 blocks,also i need to convert binary into decimal in form of idx=[1 2 3 6 9 8 7 4] and save these values in another matrix, i attach my code below
2 次查看(过去 30 天)
显示 更早的评论
k=imread('D:\research work\clock.tiff');
[rows, columns] = size(k);
thresholds = k(2:3:end, 2:3:end); % Get centers of 3x3
% Make same size as data
thresholds = imresize(thresholds, [rows, columns], 'nearest');
out = k > thresholds;
idx=[1 2 3 6 9 8 7 4];
B=cellfun(@(c)c(idx),out,'uni',0);
B=bin2dec(vertcat(B{:}));
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!