The present invention relates to an image processing technique and in more detail, to a technique to extract a region of interest of a captured image.
As the format of a captured image captured by a camera, a format is adopted, which has only pixel information on one channel in one pixel. In many cases, the format of a captured image is not convenient in performing high-level image processing, such as geometric transformation and image recognition, unless some processing is performed for the format, and therefore, a method of converting the format of a captured image into a format having pixel information on a plurality of channels at one pixel position is performed widely. As the format having pixel information on a plurality of channels at one pixel position, for example, the RGB format and the YCbCr format exist.
Generally, in such format conversion, there is a possibility that the image quality of an image after format conversion is reduced because demosaicking processing is performed for the captured image. In order to restore the image quality reduced by format conversion, the method of Japanese Patent Laid-Open No. 2011-066748 has been proposed. Japanese Patent Laid-Open No. 2011-066748 has disclosed a resolution conversion technique to reproduce an edge (boundary where light and shade are clear) included in a RAW image in an RGB 3 channel image by performing resolution conversion of the RGB 3 channel image by using edge information obtained from the RAW image.
The present invention provides a technique that obtains an image from which information indicating image quality characteristics of a captured image is not lost while reducing the amount of data.
The image processing apparatus of the present invention has: a format conversion unit configured to convert an image in a first format into an image in a second format whose amount of information indicating image quality characteristics is reduced compared to that of the image in the first format; a detection unit configured to detect a partial region in the image in the second format; an inverse conversion unit configured to inversely convert region information representing the detected partial region into region information corresponding to the first format; and an extraction unit configured to extract a partial image in the first format by using the inversely converted region information.
Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.
In an image processing system having a configuration in which a captured image is transmitted to an image processing server, in view of image processing performed in the image processing server, it is preferable for information indicating image quality characteristics of the captured image to be transferred to the image processing server with as slight a loss as possible of the information.
However, in a case where an image whose amount of data is large (for example, RAW image) is transferred to the image processing server, the processing load of the entire image processing system increases. Although a method of transferring an RGB 3 channel image generated by the method of Japanese Patent Laid-Open No. 2011-066748 to the image processing server is considered, it is difficult to completely restore an edge included in a RAW image and information indicating image quality characteristics other than the edge is lost.
In the following, embodiments for embodying the present invention are explained with reference to the drawings. Note that the configurations described in the embodiments are merely exemplary and are not intended to limit the scope of the present thereto.
At step S301, the RAW image 111 is input. The RAW image 111 is a camera-captured image input to the image processing apparatus 100 from a camera, not shown schematically. It is assumed that the RAW image 111 of the present embodiment is image data whose each pixel is in the Bayer array, but the embodiment is not applied only to image data of the Bayer array. The RAW image 111 is an image in a RAW image format having, for example, a pixel array of one channel as shown in
At S302, a RAW development unit 112 performs RAW development processing. That is, the RAW development unit 112 converts the format of image data from that of the RAW image 111 of the Bayer array into that of an RGB image 113. The RGB image 113 in
At S303, a foreground region detection unit 114 receives an input of the RGB image 113, detects a foreground region within the image, and generates foreground region information 115. An example of a foreground region 501 within the RGB image 113 indicated by the foreground region information 115 is shown in
At S304, a foreground region inverse conversion unit 116 receives an input of the foreground region information 115 and calculates to which position of the original RAW image 111 the input foreground region corresponds. Then, the foreground region inverse conversion unit 116 generates RAW partial image region information 117 based on the corresponding portion of the foreground region in the original RAW image 111. In the following, the above-described processing performed by the foreground region inverse conversion unit 116 is explained with reference to
The image processing apparatus 100 of the present embodiment aims at extracting the region of interest in the RAW image 111 as the RAW partial image 119. For example, a case is considered where the RAW partial image 119 is transmitted to an image processing server (not shown schematically) in an image processing system with a configuration in which a captured image captured by a camera is transmitted to the image processing server. In this case, in view of image processing in a subsequent stage performed by the image processing server, it is desirable for the RAW partial image 119 to be pulled out in units of sets, the set including the kinds of pixels of four channels of R, G1, G2, and B making up the Bayer array. Hereinafter, the set of R, G1, G2, and B pixels in a RAW image is described as “Bayer unit”. In the present embodiment, a method is applied, which extracts a partial image by taking the Bayer unit as the minimum unit. However, the method of extracting a partial image is not limited to the above-described method and it is not necessarily required to extract a partial image in Bayer units.
At S305, a RAW partial image extraction unit 118 generates the RAW partial image 119 based on the RAW image 111 input to the image processing apparatus 100 and the RAW partial image region information 117. Next, at S306, the generated RAW partial image 119 is output.
As explained above, the image processing apparatus of the present embodiment extracts the region of interest in the RAW image by using the region of interest detected in the RGB 3 channel image. Because of this, it is possible for the image processing apparatus of the present embodiment to obtain image data from which the amount of information (for example, a tone level value for each pixel) indicating image quality characteristics of the RAW image is not lost while reducing the amount of data.
The image processing apparatus 100 of the first embodiment receives an input of the RAW image 111 captured by a camera, not shown schematically, and outputs the RAW partial image 119, which is an image obtained by extracting only the region of interest in the captured RAW image 111. In a case where it is necessary to perform geometric transformation for the captured RAW image 111, the image processing apparatus 100 of the present embodiment outputs geometric transformation information 905 indicating the contents of the geometric transformation. Due to the geometric transformation information 905 output from the image processing apparatus 100, it is possible for an image processing server (not shown schematically) arranged in a subsequent stage of the image processing apparatus 100 to perform predetermined image processing by using the geometric transformation information 905. Details of the geometric transformation will be described later.
At S301, the RAW image 111 is input.
At S302, the RAW development unit 112 performs RAW development processing. The RGB image 113 is the results of the RAW development unit 112 performing RAW development processing for the RAW image 111.
At S1001, a geometric transformation unit 901 receives an input of the RGB image 113 and performs geometric transformation for the image. The effect of the geometric transformation in the present embodiment is explained below. The image processing apparatus 100 in the present embodiment receives an input of a captured image of a camera (not shown schematically), but there is a case where the camera vibrates due to the influence of the environment in which the camera is installed and as a result, the image itself of the RAW image shifts in position for each frame. In such a case, it is possible to correct the shift in position by performing geometric transformation. Further, there is a case where geometric transformation is necessary in processing to detect a foreground. For example, in a case where foreground region detection processing by disparity between cameras is performed by using captured images captured by a plurality of cameras installed at different positions, it is possible to modify the captured image of each camera to a position at which disparity between cameras can be compared. In accordance with one of the above-described purposes, it is possible for the geometric transformation unit 901 to output an RGB geometrically transformed image 902 and the geometric transformation information 905, which are the geometric transformation results.
At S303, the foreground region detection unit 114 receives an input of the RGB geometrically transformed image 902 output from the geometric transformation unit 901 and detects the foreground region within the image and then generates the foreground region information 115.
At S1002, an inverse geometric transformation unit 903 generates inversely transformed foreground region information 904. The inverse geometric transformation unit 903 of the present embodiment performs geometric transformation, inverse to the geometric transformation performed by the geometric transformation unit 901, for the foreground region information 115 based on the geometric transformation information 905 generated at S1001 and the foreground region information generated at S303. This is performed in order to detect to which position the position of the foreground region found (S303) after the geometric transformation (S1001) corresponds in the RAW image 111, which is the original camera-captured image.
At S304, as in the first embodiment, the foreground region inverse conversion unit 116 receives an input of the inversely transformed foreground region information 904 and calculates to which position of the original RAW image 111 the input foreground region corresponds. Then, the foreground region inverse conversion unit 116 generates the RAW partial image region information 117 based on the corresponding portion of the foreground region in the original RAW image 111.
At S305, as in the first embodiment, the RAW partial image extraction unit 118 generates the RAW partial image 119 based on the RAW image 111 input to the image processing apparatus 100 and the RAW partial image region information 117 generated at S304. Next, at S306, the generated RAW partial image 119 is output.
As explained above, it is possible for the image processing apparatus of the present embodiment to output geometric transformation information indicating the contents of geometric transformation performed for a RAW image along with a RAW partial image. Because of this, the image processing apparatus of the present embodiment has a further effect that it is possible for the image processing server arranged in a subsequent stage of the image processing apparatus to easily perform image processing for a RAW image by using geometric transformation information. In the above described first and second embodiments, the example of a case is explained where the image that is input to the image processing apparatus 100 is the RAW image 111. However, it may also be possible to input an image, which is a RAW image for which some image processing has been performed, to the image processing apparatus 100.
Embodiment(s) of the present invention can also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as a ‘non-transitory computer-readable storage medium’) to perform the functions of one or more of the above-described embodiment(s) and/or that includes one or more circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiment(s), and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). The computer may comprise one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, a memory card, and the like.
According to the present invention, an effect is obtained that it is possible to obtain an image from which information indicating image quality characteristics of a captured image is not lost while reducing the amount of data.
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2017-123409 filed Jun. 23, 2017, which is hereby incorporated by reference wherein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2017-123409 | Jun 2017 | JP | national |