{
"title": "gray2rgb",
"category": "image/color",
"keywords": [
"gray2rgb",
"grayscale",
"rgb",
"image"
],
"summary": "Replicate a grayscale image into an RGB truecolor image.",
"references": [],
"gpu_support": {
"elementwise": false,
"reduction": false,
"precisions": [],
"broadcasting": "none",
"notes": "GPU inputs gather to host before channel replication."
},
"fusion": {
"elementwise": false,
"reduction": false,
"max_inputs": 1,
"constants": "inline"
},
"requires_feature": null,
"tested": {
"unit": "builtins::image::color::gray2rgb::tests"
},
"description": "`gray2rgb(I)` replicates an MxN grayscale image across red, green, and blue planes to produce MxNx3 truecolor data.",
"behaviors": [
"Accepts MxN grayscale images.",
"Preserves host tensor dtype metadata."
],
"examples": [
{
"description": "Replicate Gray To RGB",
"input": "RGB = gray2rgb(I);",
"output": "% RGB is MxNx3"
}
],
"links": [
{
"label": "rgb2gray",
"url": "./rgb2gray"
}
],
"source": {
"label": "crates/runmat-runtime/src/builtins/image/color/gray2rgb.rs",
"url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/image/color/gray2rgb.rs"
}
}