@openhps/opencv
    Preparing search index...

    Function blobFromImages

    • Creates 4-dimensional blob from series of images. Optionally resizes and crops images from center, subtract mean values, scales values by scalefactor, swap Blue and Red channels.

      if crop is true, input image is resized so one side after resize is equal to corresponding dimension in size and another one is equal or larger. Then, crop from the center is performed. If crop is false, direct resize without cropping and preserving aspect ratio is performed.

      https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga0b7b7c3c530b747ef738178835e1e70f

      Parameters

      • images: Mat[]

        input images (all with 1-, 3- or 4-channels).

      • OptionalscaleFactor: number
      • Optionalsize: Size

        spatial size for output image

      • Optionalmean: Vec3

        scalar with mean values which are subtracted from channels. Values are intended to be in (mean-R, mean-G, mean-B) order if image has BGR ordering and swapRB is true.

      • OptionalswapRB: boolean

        flag which indicates that swap first and last channels in 3-channel image is necessary.

      • Optionalcrop: boolean

        flag which indicates whether image will be cropped after resize or not

      • Optionalddepth: number

        Depth of output blob. Choose CV_32F or CV_8U.

      Returns Mat

      4-dimensional Mat with NCHW dimensions order.

    • Creates 4-dimensional blob from series of images. Optionally resizes and crops images from center, subtract mean values, scales values by scalefactor, swap Blue and Red channels.

      if crop is true, input image is resized so one side after resize is equal to corresponding dimension in size and another one is equal or larger. Then, crop from the center is performed. If crop is false, direct resize without cropping and preserving aspect ratio is performed.

      https://docs.opencv.org/4.x/d6/d0f/group__dnn.html#ga0b7b7c3c530b747ef738178835e1e70f

      Parameters

      • images: Mat[]

        input images (all with 1-, 3- or 4-channels).

      • opts: {
            crop?: boolean;
            ddepth?: number;
            mean?: Vec3;
            scaleFactor?: number;
            size?: Size;
            swapRB?: boolean;
        }

      Returns Mat

      4-dimensional Mat with NCHW dimensions order.