Electronic device and control method thereof
An electronic device including a processor to obtain a first captured image of a display device outputting a first image; obtain proportion information of the display device based on size information of an area corresponding to the first image in the first captured image; obtain layout information of display modules of the display device based on the proportion information; allocate, based on the layout information, location information to areas respectively corresponding to the display modules in the first captured image; transmit, to the display device, a second image in which a first display module outputs an image different from those of remaining display modules; identify an area in which the different image is displayed in a second captured image of the display device outputting the second image; obtain location information corresponding to the identified area as location information of the first display module.
1 . An electronic device comprising:
a communication interface that communicates with a display device comprising a plurality of display modules; and
a processor configured to:
obtain a first captured image of the display device outputting a first image,
obtain proportion information of the display device based on size information of an area corresponding to the first image in the first captured image,
obtain a plurality of candidate layout information based on a number of the plurality of display modules,
obtain a plurality of candidate proportions based on the plurality of candidate layout information and a size of each of the plurality of display modules,
determine, as layout information of the plurality of display modules, one candidate proportion from among the plurality of candidate proportions that corresponds to the proportion information of the display device,
allocate, based on the layout information, location information to areas respectively corresponding to the plurality of display modules in the first captured image,
transmit, to the display device through the communication interface, a second image in which a first display module from among the plurality of display modules outputs an image different from images of remaining display modules from among the plurality of display modules,
identify an area in which the different image is displayed in a second captured image of the display device outputting the second image,
obtain, among the location information allocated to the areas respectively corresponding to the plurality of display modules, location information corresponding to the identified area by comparing the first captured image with the second captured image, and
obtain the obtained location information as location information of the first display module.
2 . The electronic device of claim 1 , wherein the processor is further configured to:
transmit, to the display device through the communication interface, a third image in which a second display module from among the plurality of display modules outputs an image different from images of remaining display modules from among the plurality of display modules,
identify an area in which the different image is displayed in a third captured image of the display device outputting the third image,
obtain location information allocated to the area in which the different image is displayed among the location information allocated to the areas respectively corresponding to the plurality of display modules by comparing the first captured image and the second captured image, and
identify the obtained location information allocated to the area in which the different image is displayed as the location information of the second display module in the display device.
3 . The electronic device of claim 2 , wherein the processor is configured to transmit the location information of the first display module and the location information of the second display module to the display device through the communication interface.
4 . The electronic device of claim 1 , wherein the first image is an image in which each of the plurality of display modules outputs a same image.
5 . The electronic device of claim 1 , further comprising:
a camera; and
a display,
wherein the processor is further configured to:
provide the first captured image obtained through the camera through the display,
control the display to display a guideline to distinguish areas corresponding to each of the plurality of display modules in the first captured image based on the layout information, and
while the second captured image obtained through the camera is displayed, control the display to display the guideline on an area corresponding to the display device in the second captured image.
6 . The electronic device of claim 1 , wherein the processor is further configured to:
allocate first coordinate information to areas respectively corresponding to each of the plurality of display modules in the first captured image,
allocate second coordinate information to an area in which the different image is displayed in the second captured image,
identify an area corresponding to the second coordinate information among the first coordinate information, and
obtain, among the location information allocated to the areas respectively corresponding to the plurality of display modules, location information corresponding to the identified area corresponding to the second coordinate information as the location information of the first display module.
7 . The electronic device of claim 6 , wherein the processor is further configured to:
allocate the first coordinate information by scaling sizes of areas respectively corresponding to each of the plurality of display modules,
identify respective first coordinate information comprising the second coordinate information among the first coordinate information, and
obtain, among the location information allocated to the areas respectively corresponding to the plurality of display modules, location information allocated to an area that corresponds to the identified respective first coordinate information as location information of the first display module.
8 . A control method of an electronic device, the control method comprising:
obtaining a first captured image of a display device, comprising a plurality of display modules, outputting a first image;
obtaining proportion information of the display device based on size information of an area corresponding to the first image in the first captured image;
obtaining a plurality of candidate layout information based on a number of the plurality of display modules;
obtaining a plurality of candidate proportions based on the plurality of candidate layout information and a size of each of the plurality of display modules;
determining, as layout information of the plurality of display modules, one candidate proportion from among the plurality of candidate proportions that corresponds to the proportion information of the display device;
allocating, based on the layout information, location information to areas respectively corresponding to the plurality of display modules in the first captured image;
transmitting, to the display device through a communication interface, a second image in which a first display module from among the plurality of display modules outputs an image different from images of remaining display modules from among the plurality of display modules;
identifying an area in which the different image is displayed in a second captured image of the display device outputting the second image;
obtaining, among the location information allocated to the areas respectively corresponding to the plurality of display modules, location information corresponding to the identified area by comparing the first captured image with the second captured image; and
obtaining the obtained location information as location information of the first display module.
9 . The control method of claim 8 , further comprising:
transmitting, to the display device, a third image in which a second display module from among the plurality of display modules outputs an image different from images of remaining display modules from among the plurality of display modules;
identifying an area in which the different image is displayed in a third captured image of the display device outputting the third image;
obtaining location information allocated to the area in which the different image is displayed among the location information allocated to the areas respectively corresponding to the plurality of display modules by comparing the first captured image and the second captured image; and
identifying the location information allocated to the area in which the different image is displayed as the location information of the second display module in the display device.
10 . The control method of claim 9 , further comprising:
transmitting the location information of the first display module and the location information of the second display module to the display device.
11 . The control method of claim 8 , wherein the first image is an image in which each of the plurality of display modules outputs a same image.
12 . The control method of claim 8 , further comprising:
providing the first captured image obtained through a camera through a display;
displaying a guideline to distinguish areas corresponding to each of the plurality of display modules in the first captured image based on the layout information; and
while the second captured image obtained through the camera is displayed, displaying the guideline on an area corresponding to the display device in the second captured image.
13 . The control method of claim 8 , wherein
the allocating the location information comprises allocating first coordinate information to areas respectively corresponding to each of the plurality of display modules in the first captured image, and
the obtaining the location information comprises:
allocating second coordinate information to an area in which the different image is displayed in the second captured image,
identifying an area corresponding to the second coordinate information among the first coordinate information, and
obtaining, among the location information allocated to the areas respectively corresponding to the plurality of display modules, location information corresponding to the identified area corresponding to the second coordinate information as the location information of the first display module.
14 . The control method of claim 13 , wherein
the allocating first coordinate information comprises allocating the first coordinate information by scaling sizes of areas respectively corresponding to each of the plurality of display modules, and
the obtaining the location information comprises:
identifying respective first coordinate information comprising the second coordinate information among the first coordinate information, and
obtaining, among the location information allocated to the areas respectively corresponding to the plurality of display modules, location information allocated to an area that corresponds to the identified respective first coordinate information as location information of the first display module.
15 . A non-transitory computer-readable recording medium including a program for executing a control method of an electronic device, the control method of the electronic device includes:
obtaining a first captured image of a display device, comprising a plurality of display modules, outputting a first image;
obtaining proportion information of the display device based on size information of an area corresponding to the first image in the first captured image;
obtaining a plurality of candidate layout information based on a number of the plurality of display modules;
obtaining a plurality of candidate proportions based on the plurality of candidate layout information and a size of each of the plurality of display modules;
determining, as layout information of the plurality of display modules, one candidate proportion from among the plurality of candidate proportions that corresponds to the proportion information of the display device;
allocating, based on the layout information, location information to areas respectively corresponding to the plurality of display modules in the first captured image;
transmitting, to the display device through a communication interface, a second image in which a first display module from among the plurality of display modules outputs an image different from images of remaining display modules from among the plurality of display modules;
identifying an area in which the different image is displayed in a second captured image of the display device outputting the second image;
obtaining, among the location information allocated to the areas respectively corresponding to the plurality of display modules, location information corresponding to the identified area by comparing the first captured image with the second captured image; and
obtaining the obtained location information as location information of the first display module.