Method and apparatus for detecting region of interest, electronic device, and readable storage medium
AssigneeTencent Technology (Shenzhen) Company Limited
InventorsQing ZHANG, Yu Shan ZHENG, Shi Tao WANG, Shan LIU
Life of this patent
Estimating the term…
Abstract
A method and an apparatus for detecting a region of interest (ROI), an electronic device, and a readable storage medium are provided. In the method for detecting a ROI, a target video frame image is divided into a plurality of image blocks and chrominance components of pixels of each image block are acquired. A ROI of the target video frame image is detected by determining a region type of each image block according to a ratio of pixels in an image block meeting a preset chrominance condition to pixels of the image block.
Claims20
A method for detecting a region of interest (ROI), performed by an electronic device, the method comprising:
- dividing a target video frame image into a plurality of image blocks, each of the plurality of image blocks having a preset size;
- acquiring, for each image block, chrominance components of pixels of an image block, and determining a pixel ratio of the image block according to the chrominance components of the pixels, the pixel ratio being a ratio of pixels meeting a preset chrominance condition to the pixels of the image block;
- determining region types of the plurality of image blocks based on pixel ratios of the plurality of image blocks;
- and
- detecting a ROI of the target video frame image according to the region types of the plurality of image blocks.
An apparatus for detecting a region of interest (ROI), comprising:
- at least one memory configured to store program code;
- and
- at least one processor configured to read the program code and operate as instructed by the program code, the program code comprising:
- division code configured to cause the at least one processor to divide a target video frame image into a plurality of image blocks, each of the plurality of image blocks having a preset size;
- component acquiring code configured to cause the at least one processor to acquire, for each image block, chrominance components of pixels of an image block, and determine a pixel ratio of the image block according to the chrominance components of the pixels, the pixel ratio being a ratio of pixels meeting a preset chrominance condition to the pixels of the image block;
- type determining code configured to cause the at least one processor to determine region types of the plurality of image blocks based on pixel ratios of the plurality of image blocks;
- and
- detection code configured to cause the at least one processor to detect a ROI of the target video frame image according to the region types of the plurality of image blocks.
A non-transitory computer-readable storage medium, storing a computer program that is executable by at least one processor to perform a method for detecting a region of interest (ROI), the method comprising:
- dividing a target video frame image into a plurality of image blocks, each of the plurality of image blocks having a preset size;
- acquiring, for each image block, chrominance components of pixels of an image block, and determining a pixel ratio of the image block according to the chrominance components of the pixels, the pixel ratio being a ratio of pixels meeting a preset chrominance condition to the pixels of the image block;
- determining region types of the plurality of image blocks based on pixel ratios of the plurality of image blocks;
- and
- detecting a ROI of the target video frame image according to the region types of the plurality of image blocks.
Dependencies are inferred from the claim text.