Methods and apparatus to detect a region of interest based on variable rate shading
Methods, apparatus, systems, and articles of manufacture to identify regions of interest of an image based on a variable rate shading (VRS) mask created from a video image. A method to detect the regions can include detecting, with one or more processors, regions of interest of the video image based on the VRS mask, the VRS mask generated by a renderer. The method can also include encoding, with one or more processors, the regions of interest of the video image, the encoding to include adjusting a quantization parameter suitable to encoding the regions of interest.
1 . An apparatus comprising:
at least one memory;
machine readable instructions; and
at least one processor circuit to be programmed based on the machine readable instructions to:
partition a variable rate shaded (VRS) mask of a video image into divisions, the VRS mask generated by renderer circuitry, the divisions of the VRS mask having pixels;
assign weights to the pixels based on corresponding variable rate shadings provided in the VRS mask;
sum the weights of the pixels of respective ones of the divisions of the VRS mask to determine respective total weights for the divisions;
identify ones of the divisions of the VRS mask having total weights that satisfy a threshold as important divisions;
detect one or more regions of interest of the video image based on the important divisions of the VRS mask; and
encode the one or more regions of interest of the video image.
2 . The apparatus of claim 1 , wherein one or more of the at least one processor circuit is to:
reduce a size of the VRS mask to create a map;
label components of the map that are connected to one another and associated with the important divisions;
generate a boundary around ones of the components that are labeled; and
identify the boundary as associated with a candidate region of interest.
3 . The apparatus of claim 2 , wherein one or more of the at least one processor circuit is to:
determine an effectivity value associated with the boundary;
generate a score associated with the boundary based on the effectivity value; and
supply the boundary as a region of interest to an encoder.
4 . The apparatus of claim 1 , wherein one or more of the at least one processor circuit is to:
reduce a size of the VRS mask;
identify one or more groups of pixels included in the VRS mask that are associated with important divisions and that touch one another;
select a subset of the one or more groups of pixels based on effectivity values associated respectively with the one or more groups of pixels;
calculate scores for the one or more groups of pixels in the subset; and
select, from among the subset, the one or more of the regions of interest to be identified to an encoder.
5 . A non-transitory machine readable storage medium comprising instructions to cause at least one processor circuit to at least:
detect that a variable rate shading (VRS) mask associated with a video image includes potential regions of interest;
reduce a size of the VRS mask to create a map;
identify a set of connected components of the map having components that are connected together and associated with weights that satisfy a threshold;
generate a boundary around the set of the connected components;
detect one or more regions of interest of the video image based on the boundary; and
encode the one or more detected regions of interest of the video image.
6 . The non-transitory machine readable storage medium of claim 5 , wherein the weights are total weights, and the instructions are to cause one or more of the at least one processor circuit to:
divide the VRS mask of the video image into divisions, the divisions including respective pixels;
assign respective weights to ones of the pixels based on variable shading rates of the respective pixels;
determine, for each of the divisions, sums of the respective weights of the pixels included in the divisions to obtain the total weights for the divisions; and
identify ones of the divisions of the VRS mask having total weights that satisfy the threshold as being the potential regions of interest.
7 . The non-transitory machine readable storage medium of claim 5 , wherein the instructions are to cause one or more of the at least one processor circuit to:
determine boundaries around respective sets of connected components having components that are connected together and associated with weights that satisfy the threshold;
determine respective effectivity values for the boundaries;
determine respective final scores for the boundaries based on the effectivity values; and
select one or more of the boundaries based on the final scores to form the one or more detected regions of interest.
8 . A method comprising:
identifying respective sets of connected components of a variable rate shading (VRS) map, the sets of connected components having components that are connected together and associated with weights that satisfy a threshold, the VRS map based on a VRS mask associated with a video image;
determining boundaries around the respective sets of the connected components;
determining respective effectivity scores for the boundaries;
determining respective final scores for the boundaries based on the effectivity scores;
selecting, based on the final scores, one or more of the boundaries to form regions of interest of the video image; and
encoding, with at least one processor circuit, the regions of interest of the video image.
9 . The method of claim 8 , including:
dividing the VRS mask of the video image into sub-components, the sub-components including pixels;
assigning respective weights to the pixels based on variable shading rates of the pixels identified in the VRS mask;
determining sums of the respective weights associated with the sub-components to determine respective total weights for the sub-components; and
based on the total weights of the sub-components, identifying the VRS mask of the video image as having region of interest candidates.
10 . The method of claim 8 , including reducing a size of the VRS mask to create the VRS map.
11 . The apparatus of claim 1 , wherein one of more of the at least one processor circuit is to:
adjust a quantization parameter based on a first region of interest of the one or more regions of interest; and
encode the first region of interest of the video image based on the adjusted quantization parameter.
12 . The non-transitory machine readable storage medium of claim 5 , wherein the instructions are to cause one or more of the at least one processor circuit to:
adjust a quantization parameter based on a first region of interest of the one or more regions of interest; and
encode the first region of interest of the video image based on the adjusted quantization parameter.
13 . The method of claim 8 , including:
adjusting a quantization parameter based on a first region of interest of the regions of interest; and
encoding the first region of interest of the video image based on the adjusted quantization parameter.