2222
2323% Edit the above text to modify the response to help ImageSegmentation
2424
25- % Last Modified by GUIDE v2.5 04 -Nov-2015 14:14:37
25+ % Last Modified by GUIDE v2.5 16 -Nov-2015 15:20:52
2626
2727% set(gcf,'units','normalized')%?????,??????????;
2828
@@ -431,12 +431,29 @@ function selectpoint_Callback(hObject, eventdata, handles)
431431% plot(gray);title(vector);
432432
433433% D = bwdist(segOutline,'euclidean');
434- % [px,py] = gradient(D);
434+ % [px,py] = gradient(D); % for example px(2,1) = (D(3,1)+D(1,1))/2
435435% figure;imagesc(D);
436436% %axis([1,108,90,1]);
437437% figure;contour(D);
438-
439-
438+ % vector = 5;
439+ % graymapIn = zeros(length(segOutline(1,:)),length(segOutline(:,1)));
440+ % graymapOut = graymapIn;
441+ % [x,y]=find(segOutline);
442+ % for i = 1:length(find(segOutline))
443+ % positionX = vector*px(x(i),y(i))+x(i);
444+ % positionY = vector*py(x(i),y(i))+y(i);
445+ % graymapOut(round(positionX), round(positionY)) = 1;
446+ % positionX = (-1)*vector*px(x(i),y(i))+x(i);
447+ % positionY = (-1)*vector*py(x(i),y(i))+y(i);
448+ % graymapIn(round(positionX), round(positionY)) = 1;
449+ % end
450+ % figure;imshow(graymapOut);
451+ % figure;imshow(graymapIn);
452+ %
453+ % for i = 1:length(find(segOutline))
454+ % posX(i) = px(x(i),y(i));
455+ % posY(i) = py(x(i),y(i));
456+ % end
440457
441458
442459% --- Executes on button press in average.
@@ -636,12 +653,12 @@ function axes5_CreateFcn(hObject, eventdata, handles)
636653% Hint: place code in OpeningFcn to populate axes5
637654
638655
639- % --- Executes on button press in rollback .
640- function rollback_Callback (hObject , eventdata , handles )
641- % hObject handle to rollback (see GCBO)
656+ % --- Executes on button press in expand .
657+ function expand_Callback (hObject , eventdata , handles )
658+ % hObject handle to expand (see GCBO)
642659% eventdata reserved - to be defined in a future version of MATLAB
643660% handles structure with handles and user data (see GUIDATA)
644- % global label;
661+ global label ;
645662% global seed;
646663 global myseed ; % used for plot
647664% label = label(2:end-1);
@@ -689,4 +706,4 @@ function rollback_Callback(hObject, eventdata, handles)
689706 end
690707 end
691708end
692- newsegOutline = newsegOutline - segOutline ;
709+ newsegOutline = newsegOutline - segOutline ;
0 commit comments