[−][src]Function opencv::dnn::blob_from_images
pub fn blob_from_images(
images: &dyn ToInputArray,
scalefactor: f64,
size: Size,
mean: Scalar,
swap_rb: bool,
crop: bool,
ddepth: i32
) -> Result<Mat>
Creates 4-dimensional blob from series of images. Optionally resizes and crops @p images from center, subtract @p mean values, scales values by @p scalefactor, swap Blue and Red channels.
Parameters
- images: input images (all with 1-, 3- or 4-channels).
- size: spatial size for output image
- mean: scalar with mean values which are subtracted from channels. Values are intended to be in (mean-R, mean-G, mean-B) order if @p image has BGR ordering and @p swapRB is true.
- scalefactor: multiplier for @p images values.
- swapRB: flag which indicates that swap first and last channels in 3-channel image is necessary.
- crop: flag which indicates whether image will be cropped after resize or not
- ddepth: Depth of output blob. Choose CV_32F or CV_8U. @details if @p crop is true, input image is resized so one side after resize is equal to corresponding dimension in @p size and another one is equal or larger. Then, crop from the center is performed. If @p crop is false, direct resize without cropping and preserving aspect ratio is performed.
Returns
4-dimensional Mat with NCHW dimensions order.
C++ default parameters
- scalefactor: 1.0
- size: Size()
- mean: Scalar()
- swap_rb: false
- crop: false
- ddepth: CV_32F