How to use arguments validation functions for multi-frame images?
Show older comments
Hi, I am designing a function to analyse an image sequence frame by frame to return a vector of time according to the cardiac cycle. For the image file argument validation, how do I customise a validation function for these two purposes:
1) ensure each sequence have a reasonable duration (number of frames, minimum 75 frames in total) 2) must be a 3D array
Thanks in advance!
function peaktimes = detectCardiacPhase(img, frameRate)
arguments
img (:,:,:) {mustBeNumeric}
frameRate double {mustBePositive} = 15 %default value of frameRate is 15 frames/sec
end
end
Accepted Answer
More Answers (0)
Categories
Find more on Image Preview and Device Configuration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!