Implementing colorThreshold export function within a script
조회 수: 9 (최근 30일)
이전 댓글 표시
I am trying to implement colourThreshold in my script such that if I use the colorThreshold App via colorThreshold(rgb). the resulting image/function I get by adjusting the colour saturation will be implemented into my script, opposed to being exported into a new script, I don't mind re-running but I have a lot of images to analysis and if it was an active script it would make my job any easier. is this possible any advice would be really helpful
댓글 수: 0
답변 (1개)
Image Analyst
2018년 2월 11일
Just export to a function, and copy the insides of the function to your script. Then you don't have to save the function - just close the window without saving it. The needed code will now be in your script instead. Though I think it would be better to leave it as a function particularly since you're going to be doing it a lot of times.
댓글 수: 2
Image Analyst
2018년 2월 11일
Jay's "Answer" moved here:
Cheers, that's what I went for in the end. my main issue is I'm doing some pre-processing and post-processing with the colour threshold app slap bang in the middle of my script and each image having different function variables. OS i just decided to shove an 'if' statement in that cuts the script till I've saved the function
Image Analyst
2018년 2월 11일
Any reason why you don't want a function, especially since it will be used with lots of separate scripts, each with separate parameters?
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!