Implementing colorThreshold export function within a script
11 次查看(过去 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!