Assign specific gray scale values for a picture
3 次查看(过去 30 天)
显示 更早的评论
is there any way to make a new picture have only the gray scale value that lay between 200 and 205
I wrote this but is did not worrk
![Screen Shot 2019-03-20 at 1.57.35 AM.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/209323/Screen%20Shot%202019-03-20%20at%201.57.35%20AM.png)
I want to write a code that able to determine yallow object fiducials of this picture
![Screen Shot 2019-03-20 at 2.00.52 AM.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/209324/Screen%20Shot%202019-03-20%20at%202.00.52%20AM.png)
and then make it look like that
![Screen Shot 2019-03-20 at 2.04.02 AM.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/209325/Screen%20Shot%202019-03-20%20at%202.04.02%20AM.png)
1 个评论
Jan
2019-3-20
Please post code as text and not as screenshot. Suggesting a modification is easy, when copy&paste is possible.
"Did not work" is a very lean description of the problem. Please mention the details. I guess you get a message, that && can be applied to scalar inputs only. You need & as operator. If you read the error message, this should be clear immediately, so I'm not sure, what the problem is.
What does "have only the gray scale value inside range" mean? What should happen with the other values? Maybe you mean:
grey_picture = min(max(grey_picture, 205), 200)
I do not understand the purpos of the attached picture. I guess, only the grey scale part matters, not the idons of the figure. Then it would be useful to crop the parts, which do not concern the question.
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!