Design
Generate depth maps from images using brightness, saturation, and edge analysis. Creates grayscale depth maps where lighter pixels indicate closer objects and darker pixels indicate further objects.
Call this tool from your code in three languages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/image-depth-map' \
-F 'file=@/path/to/imageFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/image-depth-map' \
-F 'imageFile=/path/to/file.ext' \
-F 'method=combined' \
-F 'invert=false' \
-F 'edgeEnhancement=true' \
-F 'blur=1' \
-F 'brightnessWeight=0.5' \
-F 'saturationWeight=0.3' \
-F 'edgeWeight=0.2' \
-F 'format=png' \
-F 'quality=90'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/image-depth-map| Name | Type | Required | Description |
|---|---|---|---|
| imageFile | fileupload required | Yes | Upload an image to generate its depth map |
| method | select | No | Algorithm used to calculate depth values |
| invert | checkbox | No | Invert the depth map (dark = close, light = far) |
| edgeEnhancement | checkbox | No | Apply edge detection to enhance object boundaries in depth map |
| blur | range | No | Apply gaussian blur to smooth the depth map |
| brightnessWeight | range | No | How much brightness affects depth calculation (combined mode only) |
| saturationWeight | range | No | How much color saturation affects depth calculation (combined mode only) |
| edgeWeight | range | No | How much edges affect depth calculation (combined mode only) |
| format | select | No | Output image format for depth map |
| quality | number | No | Quality setting for lossy formats (JPEG, WebP) |
File result
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-image-depth-map": {
"name": "image-depth-map",
"description": "Generate depth maps from images using brightness, saturation, and edge analysis. Creates grayscale depth maps where lighter pixels indicate closer objects and darker pixels indicate further objects.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-depth-map",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "image-depth-map",
"arguments": {
"imageFile": "https://example.com/file.ext",
"method": "combined",
"invert": false,
"edgeEnhancement": true,
"blur": 1,
"brightnessWeight": 0.5,
"saturationWeight": 0.3,
"edgeWeight": 0.2,
"format": "png",
"quality": 90
}
}
}Questions or issues? Contact [email protected]