{"title": "CameraStageMapper", "properties": {"image_resolution": {"description": "The image size used to calibrate the image_to_stage_displacement_matrix.", "title": "The image size used to calibrate the image_to_stage_displacement_matrix.", "oneOf": [{"type": "array", "items": [{"type": "number"}, {"type": "number"}], "maxItems": 2, "minItems": 2}, {"type": "null"}], "forms": [{"href": "/camera_stage_mapping/image_resolution", "op": ["readproperty"]}]}, "image_to_stage_displacement_matrix": {"description": "Note that this matrix is defined using \"matrix coordinates\", i.e. image coordinates\nmay be (y,x). This is an artifact of the way numpy, opencv, etc. define images. If\nyou are making use of this matrix in your own code, you will need to take care of\nthat conversion.\n\nIt is often helpful to give a concrete example: to make a move in image coordinates\n(``dy``, ``dx``), where ``dx`` is horizontal, i.e. the longer dimension of the image, you\nshould move the stage by:\n\n.. code-block:: python\n\n    stage_disp = np.dot(\n        np.array(image_to_stage_displacement_matrix),\n        np.array([dy,dx]),\n    )", "title": "A 2x2 matrix that converts displacement in image coordinates to stage coordinates.", "oneOf": [{"type": "array", "items": {"type": "array", "items": {"type": "number"}}}, {"type": "null"}], "forms": [{"href": "/camera_stage_mapping/image_to_stage_displacement_matrix", "op": ["readproperty"]}]}, "last_calibration": {"title": "last_calibration", "oneOf": [{"type": "object"}, {"type": "null"}], "forms": [{"href": "/camera_stage_mapping/last_calibration", "op": ["readproperty"]}]}, "thing_state": {"description": "Summary metadata describing the current state of the Thing.", "title": "Summary metadata describing the current state of the Thing.", "type": "object", "forms": [{"href": "/camera_stage_mapping/thing_state", "op": ["readproperty"]}]}}, "actions": {"calibrate_1d": {"description": "Move a microscope's stage in 1D, and figure out the relationship with the camera.", "title": "Move a microscope's stage in 1D, and figure out the relationship with the camera.", "forms": [{"href": "/camera_stage_mapping/calibrate_1d", "op": ["invokeaction"]}], "input": {"title": "calibrate_1d_input", "type": "object", "properties": {"direction": {"title": "Direction", "type": "array", "items": [{"type": "number"}, {"type": "number"}, {"type": "number"}], "maxItems": 3, "minItems": 3}}, "required": ["direction"]}, "output": {"description": "A `pydantic` model for a dictionary that converts arrays to lists.", "title": "calibrate_1d_output", "type": "object"}}, "calibrate_xy": {"description": "This performs two 1d calibrations in x and y, then combines their results.\n        ", "title": "Move the microscope's stage in X and Y, to calibrate its relationship to the camera.", "forms": [{"href": "/camera_stage_mapping/calibrate_xy", "op": ["invokeaction"]}], "input": {"description": "Represent the input of an action that never takes parameters.\n\nThis may be either an empty dictionary or ``None``.", "title": "calibrate_xy_input", "oneOf": [{"description": "A model representing an object that must have no keys.", "title": "StrictEmptyObject", "type": "object", "properties": {}}, {"type": "null"}]}, "output": {"description": "A `pydantic` model for a dictionary that converts arrays to lists.", "title": "calibrate_xy_output", "type": "object"}}, "move_in_image_coordinates": {"description": "NB x and y here refer to what is usually understood to be the horizontal and\nvertical axes of the image. In many toolkits, \"matrix indices\" are used, which\nswap the order of these coordinates. This includes opencv and PIL. So, don't be\nsurprised if you find it necessary to swap x and y around.\n\nAs a general rule, ``x`` usually corresponds to the longer dimension of the image,\nand ``y`` to the shorter one. Checking what shape your chosen toolkit reports for\nan image usually helps resolve any ambiguity.", "title": "Move by a given number of pixels on the camera.", "forms": [{"href": "/camera_stage_mapping/move_in_image_coordinates", "op": ["invokeaction"]}], "input": {"title": "move_in_image_coordinates_input", "type": "object", "properties": {"x": {"title": "X", "type": "number"}, "y": {"title": "Y", "type": "number"}}, "required": ["x", "y"]}, "output": {"title": "move_in_image_coordinates_output"}}}, "base": "http://testserver/", "securityDefinitions": {"no_security": {"description": "No security", "scheme": "nosec"}}, "security": "no_security", "@context": "https://www.w3.org/2022/wot/td/v1.1"}