--- a +++ b/Tests/Cameras.any @@ -0,0 +1,90 @@ + + AnyOperationSequence RunTest = { + AnyOperation& LoadTimeImage = Main.LoadTimeCam.Preview; + AnyOperation& initpos = Main.CameraInitPos; + AnyOperation& InitPosImage = Main.InitPosCam.Preview; + + }; + + #ifdef TEST_NAME + AnyString CameraName = TEST_NAME; + #define _OPEN_PREVIEW OFF + #else + AnyString CameraName = ANYBODY_NAME_MAINFILE; + #define _OPEN_PREVIEW ON + #endif + + #ifndef _MODEL_UP_DIRECTION + #define _MODEL_UP_DIRECTION y + #endif + + + + VideoLookAtCamera LoadTimeCam(_AUTO_OPEN_PREVIEW_=_OPEN_PREVIEW, UP_DIRECTION=_MODEL_UP_DIRECTION, TRANSPARENT_BACKGROUND = 1) = + { + VideoInputScale = 1; + VideoResolution = {500,500}; + BackgroundColor = DesignVar({1,1,1}); + //CameraUpDirection = Main.CameraUpDirection; + Preview.FileName = Main.CameraName + "_LoadTime.png"; + #ifdef CREATE_IMAGE_FULLDIR + VideoOutputPath = CREATE_IMAGE_FULLDIR; + #else + VideoOutputPath = ANYBODY_PATH_OUTPUT; + #endif + Camera.Recorder.AntiAlias = 4; + }; + + + + VideoLookAtCamera InitPosCam(_AUTO_OPEN_PREVIEW_=_OPEN_PREVIEW, UP_DIRECTION=_MODEL_UP_DIRECTION, TRANSPARENT_BACKGROUND = 1) = + { + VideoInputScale = 1; + VideoResolution = {500,500}; + CameraLookAtPoint = Main.LoadTimeCam.CameraLookAtPoint; + CameraFieldOfView = Main.LoadTimeCam.CameraFieldOfView; + CameraDirection = Main.LoadTimeCam.CameraDirection; + CameraUpDirection = Main.LoadTimeCam.CameraUpDirection; + BackgroundColor = DesignVar({1,1,1}); + Preview.FileName = Main.CameraName + "_InitPos.png"; + #ifdef CREATE_IMAGE_FULLDIR + VideoOutputPath = CREATE_IMAGE_FULLDIR; + #else + VideoOutputPath = ANYBODY_PATH_OUTPUT; + #endif + Camera.Recorder.AntiAlias = 4; + + }; + + + #ifdef CREATE_VIDEO + RunTest = + { + AnyOperation& InitPosImage = Main.VideoCam.Create_Video; + }; + VideoLookAtCamera VideoCam(_AUTO_PLAY_VIDEOS=_OPEN_PREVIEW) = + { + VideoName = Main.CameraName; + Analysis = { + AnyOperation &ref = Main.RunApplication; + }; + VideoInputScale = 5; + VideoResolution = {350,350}; + CameraUpDirection = Main.LoadTimeCam.CameraUpDirection; +// VideoInputFrameRate = 30; + VideoOutputFrameRate = 30; + CameraLookAtPoint = Main.InitPosCam.CameraLookAtPoint; + CameraFieldOfView = Main.InitPosCam.CameraFieldOfView; + CameraDirection = Main.InitPosCam.CameraDirection; + BackgroundColor = DesignVar({1,1,1}); + //Counter = Main.study.iStep; + #ifdef CREATE_IMAGE_FULLDIR + VideoOutputPath = CREATE_IMAGE_FULLDIR; + #else + VideoOutputPath = ANYBODY_PATH_OUTPUT; + #endif + Camera.Recorder.AntiAlias = 0; + + }; + #endif +