Method, apparatus, and recording medium for processing image
A method, performed by a device, of processing an image, may include obtaining a circular image generated by photographing a target space through a fisheye lens; generating metadata including lens shading compensation information for correcting color information of the obtained circular image; and transmitting the obtained circular image and the metadata to a terminal.
1. A method of processing an image by an electronic device, the method comprising:
obtaining a plurality of circular images via at least one fisheye lens;
obtaining fisheye information including lens shading compensation information, wherein the lens shading compensation information includes coefficients of a polynomial function for each of RGB colors of the plurality of circular images and a number of the coefficients; and
transmitting the obtained plurality of circular images and the lens shading compensation information toward another electronic device,
wherein the polynomial function represents relation between lens shading compensation values for the plurality of circular images and a distance from a center of an image of the plurality of circular images,
wherein the polynomial function is w=Σ i=1 N p i-1 ·r i-1 , where w is a lens shading compensation value for one of the RGB colors, N is the number of the coefficients, p i-1 is a coefficient and r is the distance from the center of the image, and
wherein compensating the plurality of circular images is performed in the another electronic device by using the lens shading compensation values.
2. The method of claim 1 , wherein the fisheye information is used for rendering a plurality of compensated circular images corresponding to the plurality of circular images in the another electronic device.
3. The method of claim 1 , wherein the lens shading compensation values are used for correcting color information of each of a plurality of regions in the image in the another electronic device.
4. The method of claim 1 , wherein the coefficients indicate a correspondence between a plurality of regions in the image, identified based on the distance from the center of the image.
5. A system comprising an electronic device of processing an image and another electronic device, the electronic device comprising:
a communicator;
a memory for storing instructions; and
at least one processor configured to execute the stored instructions to at least:
obtain a plurality of circular images, wherein the plurality of circular images are captured via at least one fisheye lens;
obtain fisheye information including lens shading compensation information, wherein the lens shading compensation information includes coefficients of a polynomial function for each of RGB colors of the plurality of circular images and a number of the coefficients; and
transmit, via the communicator, the obtained plurality of circular images and the lens shading compensation information toward the another electronic device,
wherein the polynomial function represents relation between lens shading compensation values for the plurality of circular images and a distance from a center of an image of the plurality of circular images,
wherein the polynomial function is w=Σ i=1 N p i-1 ·r i-1 , where w is a lens shading compensation value for one of the RGB colors, N is the number of the coefficients, p i-1 is a coefficient and r is the distance from the center of the image, and
wherein the another electronic device performs compensating the plurality of circular images by using the lens shading compensation values.
6. The system of claim 5 , wherein the fisheye information is used for rendering a plurality of compensated circular images corresponding to the plurality of circular images in the another electronic device.
7. The system of claim 5 , wherein the lens shading compensation values are used for correcting color information of each of a plurality of regions in the image in the another electronic device.
8. The system of claim 5 , wherein the coefficients indicate a correspondence between a plurality of regions in the image, identified based on the distance from the center of the image.