Help using rectangle() function to generate a matrix for image processing;
이전 댓글 표시
Hi y'all i have a question about the function rectangle(), im using it to make 6x4 disk grid.
I was trying to use viscircles() as it would be much easier, but i cant fill them in appropiately.
Im using it to generate circles, but for the life of me I can not figure out how to save the figure output.
My code currently reads:
for i=1:24
h=rectangle('Position', [px(i) py(i) d d],'Curvature',[1,1],'FaceColor',[0 0 (1/24)*i]);
end
Where px and py are the specific positions where i want the disks printed, and d is the diameter of those disks.
These were read from imfindcircles(), giving me specific points that each circle is from.
Each one needs to be a different value (preferably 1:24). a circle of 1's then 2's and so on an so forth.
this is what im getting, which is exaclty what i need. But i have no way of saving it as data.

I have an idea to try the insertshape() command, but it seems like i couldnt save it as a [0 255] value instead of a color.
If you have any ideas or suggestions please reach out.
Thanks
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Object Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!