WO2023093438A1 - 图像显示方法、装置、电子设备及计算机可读存储介质 - Google Patents

图像显示方法、装置、电子设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2023093438A1
WO2023093438A1 PCT/CN2022/127702 CN2022127702W WO2023093438A1 WO 2023093438 A1 WO2023093438 A1 WO 2023093438A1 CN 2022127702 W CN2022127702 W CN 2022127702W WO 2023093438 A1 WO2023093438 A1 WO 2023093438A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
camera
cameras
image
layout
Prior art date
Application number
PCT/CN2022/127702
Other languages
English (en)
French (fr)
Inventor
张子煜
伍超
杨俊拯
何�轩
江双
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023093438A1 publication Critical patent/WO2023093438A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/66Remote control of cameras or camera parts, e.g. by remote control devices
    • H04N23/661Transmitting camera control signals through networks, e.g. control via the Internet
    • H04N23/662Transmitting camera control signals through networks, e.g. control via the Internet by using master/slave camera arrangements for affecting the control of camera image capture, e.g. placing the camera in a desirable condition to capture a desired image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources

Definitions

  • the present application relates to the technical field of human-computer interaction, and in particular to an image display method, device, electronic equipment, and computer-readable storage medium.
  • the embodiment of the present application discloses an image display method, device, electronic equipment, and computer-readable storage medium, which can more flexibly display the image frames of each target camera, meet user needs, and increase user viscosity.
  • the embodiment of the present application discloses an image display method, which is applied to a first device, and the first device establishes a communication connection with at least one second device; the method includes: connecting the first device and the at least one second device 2.
  • the method includes: connecting the first device and the at least one second device 2.
  • at least one target camera is determined; according to the number of target cameras, the layout of the first interface is determined; the image data collected by each of the target cameras is obtained; according to the image data, according to the first interface
  • the layout displays at least part of image frames respectively corresponding to the target cameras in the current user interface.
  • the embodiment of the present application discloses an image display device, which is applied to a first device, and the first device establishes a communication connection with at least one second device;
  • the device includes: a camera determination module configured to obtain Among the cameras set on the device and the at least one second device, at least one target camera is determined;
  • the layout determination module is configured to determine the layout of the first interface according to the number of target cameras;
  • the data acquisition module is configured to acquire each Image data collected by the target camera;
  • a display module configured to display at least part of the image frames respectively corresponding to the target cameras in the current user interface according to the first interface layout according to the image data.
  • the embodiment of the present application discloses an electronic device, including a memory and a processor, where a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method as described above.
  • the embodiment of the present application discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above method is realized.
  • Fig. 1 is a schematic diagram of an image display method in an embodiment
  • Fig. 2 is a flowchart of an image display method in an embodiment
  • Fig. 3A is a schematic diagram of the layout of the first interface in an embodiment
  • Fig. 3B is a schematic diagram of the layout of the first interface in another embodiment
  • Fig. 4 is the flowchart of image display method in another embodiment
  • Fig. 5 is a schematic diagram of a user selecting a target camera in an embodiment
  • FIG. 6 is a schematic diagram of an interface showing image data collected by a target camera corresponding to a target image frame in one embodiment
  • FIG. 7 is a schematic diagram of an interface displaying an image picture corresponding to a target camera according to a draggable layout in an embodiment
  • FIG. 8 is a schematic diagram of an interface displaying an image picture corresponding to a target camera according to a non-dragable layout in an embodiment
  • Fig. 9 is a flow chart of determining the first interface layout and displaying it in the current user interface based on the first interface layout in an embodiment
  • Fig. 10 is a schematic diagram of the layout of the first interface in yet another embodiment
  • Fig. 11 is a schematic diagram of the layout of the first interface in another embodiment
  • Fig. 12A is a schematic diagram of a first intercepting frame in an embodiment
  • Fig. 12B is a schematic diagram of a second interception frame in an embodiment
  • Fig. 12C is a schematic diagram of a second interception frame in another embodiment
  • Fig. 13 is a schematic diagram of adapting the target interception frame in an embodiment
  • Fig. 14 is a flow chart of determining the first interface layout and displaying it in the current user interface based on the first interface layout in another embodiment
  • Fig. 15 is a schematic diagram of a horizontal screen image and a vertical screen image in an embodiment
  • Fig. 16A is a schematic diagram of the layout of the first interface in which the screen shape is a horizontal screen in an embodiment
  • Fig. 16B is a schematic diagram of the layout of the first interface in which the screen shape is a vertical screen in an embodiment
  • Fig. 17 is a flowchart of an image display method in yet another embodiment
  • Fig. 18 is a schematic diagram of dynamically adjusting the interface layout of the user interface according to the number of changing target cameras in one embodiment
  • Fig. 19 is a schematic diagram of dynamically adjusting the interface layout of the user interface according to the changing number of target cameras in another embodiment
  • Fig. 20 is a schematic diagram of dynamically adjusting the interface layout of the user interface according to the changing number of target cameras in yet another embodiment
  • Figure 21 is a block diagram of an image display device in an embodiment
  • Fig. 22 is a structural block diagram of an electronic device in one embodiment.
  • first and second and the like in the specification and claims of the present disclosure are used to distinguish different objects, rather than to describe a specific order of objects.
  • first camera and the second camera are used to distinguish different cameras, not to describe a specific order of the cameras.
  • words such as “exemplary” or “for example” are used as examples, illustrations or illustrations. Any embodiment or design described as “exemplary” or “for example” in the embodiments of the present disclosure shall not be construed as being preferred or advantageous over other embodiments or designs. To be precise, the use of words such as “exemplary” or “for example” is intended to present related concepts in a specific manner. In addition, in the description of the embodiments of the present disclosure, unless otherwise specified, the meaning of "plurality” refers to two one or more.
  • the electronic device can only be connected to one camera at a time, that is, the user can only select one camera (it can be a camera on the electronic device or a camera on other electronic devices) , the electronic device displays the images collected by the camera selected by the user, and cannot display the images collected by multiple cameras at the same time.
  • the electronic device will switch to display the images captured by the re-selected camera after the camera needs to be re-selected.
  • the electronic device When increased, users can become confused about which camera they have viewed. Therefore, for electronic devices with camera-mounted multi-camera functions, there is still a need for optimization in terms of image display and interaction.
  • Embodiments of the present application provide an image display method, device, electronic device, and computer-readable storage medium, which can more flexibly display images of various target cameras, meet user needs, and increase user viscosity.
  • user operations can be simplified and interaction convenience can be improved.
  • An embodiment of the present application provides an image display method, which is applied to a first device, and the first device establishes a communication connection with at least one second device; the method includes: from the first device and the at least one second device Among the cameras set on the device, at least one target camera is determined; according to the determined number of the target cameras, the first interface layout is determined; the image data collected by each of the target cameras is acquired; according to the image data, according to the The first interface layout displays at least part of image frames respectively corresponding to the target cameras in the current user interface.
  • the determining at least one target camera from the cameras set on the first device and the at least one second device includes: displaying an information list, the information list including the first Device information corresponding to the device and each of the second devices, and/or camera information corresponding to each camera set on the first device and each of the second devices; in response to the selection operation for the information list, Determine at least one target camera according to the selected device information and/or camera information.
  • the image frames corresponding to each of the target cameras have the same frame size, and the image frames corresponding to each of the target cameras are sequentially arranged in rows and/or columns cloth.
  • the first interface layout includes the corresponding arrangement position and the corresponding screen size of each of the target cameras; the image data is displayed in the current user interface according to the first interface layout
  • the image frames corresponding to at least some of the target cameras include: intercepting the image frames corresponding to each of the target cameras from the image data corresponding to each of the target cameras; For a corresponding frame size, at least part of the image frames corresponding to the target cameras are displayed in the current user interface.
  • the intercepting the image frames corresponding to each of the target cameras from the image data corresponding to each of the target cameras includes: if the number of the target cameras is greater than a first number threshold, then according to the first interception The frame intercepts the image frame corresponding to each target camera from the image data corresponding to each target camera.
  • the intercepting the image frames corresponding to each of the target cameras from the image data corresponding to each of the target cameras includes: if the number of the target cameras is less than or equal to the first number threshold, respectively according to The second clipping frame matched with the frame size corresponding to each of the target cameras intercepts the image frame corresponding to each of the target cameras from the image data corresponding to each of the target cameras.
  • the intercepting the image frames corresponding to each of the target cameras from the image data corresponding to each of the target cameras includes: if the image size of the image data corresponding to the first camera is smaller than the size of the target capture frame, Then adjust the size of the target capture frame according to the first ratio, and capture the image frame corresponding to the first camera from the image data corresponding to the first camera according to the adjusted target capture frame, wherein the first A camera is any one of the target cameras.
  • the determining the layout of the first interface according to the number of target cameras includes: acquiring a device type corresponding to each target camera, where the device type includes a horizontal screen device or a vertical screen device; determining that the device type is the The horizontal and vertical screen ratio between the target camera of the horizontal screen device and the target camera of the vertical screen device; determine the first interface layout according to the number of the target cameras and the horizontal and vertical screen ratio.
  • the first interface layout includes the shape of the screen, the corresponding arrangement position of each of the target cameras, and the corresponding screen size;
  • An interface layout comprising: if the ratio of the horizontal and vertical screens is greater than a first ratio threshold, then determining that the shape of the screen is a horizontal screen; if the ratio of the horizontal and vertical screens is smaller than a second ratio threshold, then determining that the shape of the screen is a vertical screen screen; wherein, the first ratio threshold is greater than the second ratio threshold, the length of the horizontal screen is longer than the height, and the length of the vertical screen is smaller than the height; according to the number of the target cameras, determine each The corresponding arrangement positions of the target cameras and the corresponding screen sizes.
  • displaying at least part of the image frames respectively corresponding to the target cameras in the current user interface according to the image data according to the first interface layout includes: if the frame shape is the vertical version screen, and the device type corresponding to the second camera is a vertical screen device, then according to the screen size corresponding to the second camera, the image data corresponding to the second camera is compressed to obtain the image corresponding to the second camera screen, and display the image screen corresponding to the second camera at the arrangement position corresponding to the second camera; if the shape of the screen is the vertical screen, and the device type corresponding to the third camera is a horizontal screen device, Then intercept the image frame corresponding to the third camera from the image data corresponding to the third camera according to the target vertical interception frame, and display the image frame corresponding to the third camera according to the arrangement position and frame size corresponding to the third camera Corresponding image frame; wherein, the second camera and the third camera are any target cameras, and the length of the vertical interception frame of the target is smaller than the height.
  • displaying at least part of the image frames respectively corresponding to the target cameras in the current user interface according to the image data according to the first interface layout includes: if the horizontal version shape is the horizontal screen, and the device type corresponding to the third camera is a horizontal screen device, then according to the screen size corresponding to the third camera, the image data corresponding to the third camera is compressed to obtain the image data corresponding to the third camera image frame, and display the image frame corresponding to the third camera at the arrangement position corresponding to the third camera; if the horizontal version shape is the horizontal version image, and the device type corresponding to the second camera is a vertical screen equipment, intercepting the image frame corresponding to the second camera from the image data corresponding to the second camera according to the target horizontal version interception frame, and displaying the image frame corresponding to the second camera according to the arrangement position and frame size corresponding to the second camera
  • the determining the first interface layout according to the number of target cameras includes: if the number of the target cameras is greater than a second number threshold, determining that the first interface layout is a draggable layout; if the If the number of target cameras is less than or equal to the second number threshold, it is determined that the first interface layout is a non-dragable layout; and according to the image data, at least part of the current user interface is displayed according to the first interface layout
  • the image pictures respectively corresponding to the target cameras include: if the first interface layout is a draggable layout, displaying the first part of the target cameras respectively in the current user interface according to the first interface layout according to the image data Corresponding image frames; if the first interface layout is a non-dragable layout, then according to the image data, display the image frames corresponding to each of the target cameras in the current user interface according to the first interface layout.
  • the method further includes: responding to dragging the current user interface
  • the image frames corresponding to the target cameras of the second part are displayed through actuation operation, and the target cameras of the second part are different from the target cameras of the first part.
  • the method further includes: when it is detected that the number of target cameras has changed, determining the second interface layout according to the changed number; according to the image data collected by each target camera after the change, according to the According to the second interface layout, the image frames corresponding to the changed target cameras are displayed in the current user interface.
  • determining the second interface layout according to the changed number includes: if the number of the target cameras decreases from the first number to the second number, and The first number is greater than a third number threshold, the second number is less than or equal to the third number threshold, or both the first number and the second number are less than or equal to the third number threshold, then according to the The second number re-determines the corresponding arrangement position and corresponding screen size of each target camera after the change, so as to obtain the second interface layout; if the number of the target cameras is reduced from the first number to the second number, and the Both the first number and the second number are greater than the third number threshold, and then delete the corresponding arrangement positions and corresponding screen sizes of the reduced target cameras, so as to obtain the second interface layout.
  • determining the second interface layout according to the changed number includes: if the number of the target cameras increases from the first number to the third number, and The first number is less than or equal to the third number threshold, the third number is greater than the third number threshold, or both the first number and the third number are less than or equal to the third number threshold, then according to the first The third number re-determines the corresponding arrangement position and corresponding screen size of each target camera after the change, so as to obtain the second interface layout; if the number of the target cameras increases from the first number to the third number, and the first If both the number and the third number are greater than the third number threshold, then determine the corresponding arrangement position and the corresponding screen size of each added target camera, so as to obtain the second interface layout.
  • the method further includes: in response to the viewing operation on the target image frame, displaying the image data collected by the target camera corresponding to the target image frame, wherein the target image frame is any target camera corresponding image screen.
  • the method further includes: in response to the shooting operation, sending a shooting instruction to the target device corresponding to each of the target cameras, where the shooting instruction is used to instruct the target device to control its own target camera to capture images , to obtain a target image; acquiring the target images obtained by each of the target devices, and splicing the target images according to the first interface layout to obtain a spliced image.
  • the first interface layout includes the screen size corresponding to each of the target cameras; the shooting instruction carries the screen size corresponding to the target camera set on the target device; the shooting instruction is used to indicate the The target device controls its own target camera to shoot to obtain an image to be processed, and intercepts the image to be processed according to the screen size carried in the shooting instruction to obtain a target image.
  • the method further includes: respectively synchronizing the spliced image to each of the target devices.
  • the embodiment of the present application discloses an image display device, which is applied to a first device, and the first device establishes a communication connection with at least one second device;
  • the device includes: a camera determination module configured to obtain And among the cameras set on the at least one second device, at least one target camera is determined;
  • the layout determination module is configured to determine the layout of the first interface according to the number of target cameras;
  • the data acquisition module is configured to obtain each of the target cameras The image data collected by the target camera;
  • the display module is configured to display at least part of the image frames respectively corresponding to the target cameras in the current user interface according to the first interface layout according to the image data.
  • the embodiment of the present application discloses an electronic device, including a memory and a processor, the memory stores a computer program, and the processor is configured to realize any image display disclosed in the embodiment of the present application when executing the computer program method.
  • the embodiment of the present application discloses a computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, any image display method disclosed in the embodiment of the present application is implemented.
  • Fig. 1 is a schematic diagram of an image display method in an embodiment.
  • the first device 10 can establish a communication connection with at least one second device 20, and the first device 10 and the second device 20 can include but are not limited to mobile phones, tablet computers, smart wearable devices (such as smart glasses) , smart watches, etc.), notebook computers, PCs (Personal Computers, personal computers), digital cameras, monitoring equipment, etc.
  • a wireless communication connection such as a WiFi connection, a Bluetooth connection, a mobile network communication connection, etc., can be established between the first device 10 and the second device 20, and a wired communication connection can also be established.
  • the first device 10 and the second device 20 The specific connection method is not limited.
  • One or more cameras can be arranged on the first device 10 and each second device 20.
  • the first device 10 can be a mobile phone, which can include a front camera and a rear camera, and the second device 20 can be a monitoring device.
  • a camera etc. may be included, but not limited thereto.
  • the first device 10 may determine at least one target camera from the cameras set on the first device 10 and each second device 20, and determine the first interface layout according to the determined number of target cameras.
  • the first device 10 may acquire the image data collected by each target camera, and display at least part of the image frames respectively corresponding to the target cameras in the current user interface according to the first interface layout according to the image data.
  • an image display method is provided, which can be applied to the above-mentioned first device, and the method may include the following steps:
  • Step 210 determine at least one target camera from the cameras set on the first device and at least one second device.
  • a first device can establish a communication connection with at least one second device.
  • a multi-camera application program can be installed in the first device and each second device, and the multi-camera application program can be used to provide a function of sharing images captured by the camera among multiple electronic devices. If the first device and the second device correspond to the same account ID in the multi-camera application program, it means that the first device and the second device belong to the same user, and the first device can use the multi-camera application program to send a message to the user corresponding to the same account ID.
  • the second device sends a connection request to establish a communication connection with a second device corresponding to the same account ID.
  • the account identifier may include, but not limited to, an account ID (Identity, identity identification number), an account name, and the like.
  • the first device can establish a short-distance communication connection with the corresponding different account IDs through the multi-camera application program, such as Bluetooth connection, infrared connections, etc., but not limited to.
  • a short-distance communication connection with the corresponding different account IDs through the multi-camera application program, such as Bluetooth connection, infrared connections, etc., but not limited to.
  • both the first device and the second device can open the multi-cam application program, and when the first device and the second device respectively correspond to different account IDs, the first device and the second device can be triggered according to a preset safe interaction mode.
  • the second device establishes a short-range communication connection.
  • the preset secure interaction method may be a close-range interaction method, such as a "touch" method between the first device and the second device, or the first device displays an account identification image (such as two-dimensional code, etc.), the second device collects the account identification image through the camera, or the first device and the second device both turn on RFID (Radio Frequency Identification, radio frequency identification), and put the second device on the second device A method of "swiping a card" on a device, etc., but not limited thereto.
  • the first device and the second device establish a communication connection in a corresponding manner through the account identification in the multi-camera application program, which can improve the security of image data transmission.
  • One or more cameras may be set on the first device and each second device, and the first device may determine at least one target camera from each camera set on the first device and the second device, and the target camera may refer to The camera that needs to display the corresponding image screen in the current user interface.
  • the determined at least one target camera may be cameras belonging to different electronic devices.
  • the target camera may include a rear camera of the first device, a front camera of the second device A, and a rear camera of the second device B. camera etc.
  • the determined at least one target camera may also be a camera belonging to the same electronic device.
  • the target camera may include two cameras set on the second device A, and the like.
  • the determined at least one target camera may also include cameras belonging to different electronic devices and cameras belonging to the same electronic device.
  • the target camera may include the rear camera of the first device, the two cameras set on the second device A, etc. .
  • Step 220 Determine a first interface layout according to the determined number of target cameras.
  • the first device may determine a first interface layout according to the determined number of target cameras, and the first interface layout may be used to define a display mode of image frames corresponding to each target camera in the current user interface. Different numbers of target cameras may correspond to different layouts of the first interface.
  • the first interface layout may include the corresponding layout position and the corresponding screen size of each target camera, wherein the layout position may refer to the position of the image screen corresponding to the target camera in the current user interface, and the screen The size may refer to the size of the image frame corresponding to the target camera displayed in the current user interface.
  • the image frames corresponding to each target camera can be evenly arranged, and in the first interface layout, the frame sizes of the image frames corresponding to each target camera can be the same, and each target The image frames corresponding to the cameras are sequentially arranged in rows and/or columns, that is, the image frames corresponding to each target camera are sequentially arranged in the current user interface according to the corresponding arrangement positions with the same frame size.
  • FIG. 3A is a schematic diagram of a first interface layout in an embodiment. As shown in FIG.
  • the target camera may include main position 1 (a camera on the first device) and auxiliary position 1 (a camera on the second device), and the display frame 312 corresponding to the main position 1 is used to represent the main position
  • the arrangement position and size of the image picture corresponding to 1 in the current user interface 310, and the display frame 314 corresponding to the sub-camera position 1 is used to indicate the arrangement position and size of the image picture corresponding to the sub-camera position 1 in the current user interface 310.
  • Screen size where the screen sizes corresponding to the main station 1 and the auxiliary station 1 are the same, and the image screen of the main station 1 is arranged above the image screen of the auxiliary station 1.
  • FIG. 3B is a schematic diagram of the layout of the first interface in another embodiment.
  • the target camera may include sub-camera 1, sub-camera 2, and sub-camera 3 (belonging to three different cameras on at least one second device), and the display frame 322 corresponding to sub-camera 1,
  • the display frame 324 corresponding to the sub-camera position 2 and the display frame 326 corresponding to the sub-camera position 3 are respectively used to indicate the image frames corresponding to the sub-camera position 1, the sub-camera position 2 and the sub-camera position 3 in the current user interface 310.
  • Layout position and screen size are respectively used to indicate the image frames corresponding to the sub-camera position 1, the sub-camera position 2 and the sub-camera position 3 in the current user interface 310.
  • the screen size corresponding to auxiliary camera 1 and auxiliary camera 2 is the same, but the screen size corresponding to auxiliary camera 3 is different, and the image screen of auxiliary camera 1 is arranged on the left side of the image screen of auxiliary camera 2 , the image frames of the sub-camera 1 and the sub-camera 2 are arranged above the image frames of the sub-camera 3 .
  • Step 230 acquiring image data collected by each target camera.
  • image data collected by each target camera may be acquired from a target device corresponding to each target camera, where the target device may refer to an electronic device including the target camera. If the target device is the first device, the first device can directly obtain the image data collected by the target camera; if the target device is the second device, the first device can receive the image data sent by the target device through the communication connection with the target device. The image data collected by the target camera.
  • the second device A can send the image data collected by the camera 1 to the first device
  • the second device B can send the image data collected by the camera 2 to the first device.
  • the collected image data is sent to the second data.
  • the above-mentioned image data may be image data collected by the target camera in real time, and the image data may be used to display a complete image of each frame collected by the target camera.
  • Above-mentioned image data also can not be the image data that collects by target camera in real time, for example, can be the image data of interval certain frame number (as interval 2 frames, 3 frames, 5 frames etc.) in the image data that target camera collects in real time, also can It may be one frame of image data captured by the target camera or certain frames of image data (such as a piece of video), etc., but is not limited thereto.
  • Step 240 According to the image data, at least part of the image frames respectively corresponding to the target cameras are displayed in the current user interface according to the first interface layout.
  • image frames corresponding to each target camera may be generated according to image data collected by each target camera.
  • the image frame can be a complete image frame, that is, the image frame can be each frame of image data corresponding to each target camera, and the image quality (such as image resolution, etc.) The data remains consistent.
  • the image frame may also be a preview image of the image data (ie, an incomplete image frame), and the image frame may be an image obtained by compressing the image data, or an image obtained by intercepting the image data.
  • whether the image frame is a complete image frame or a preview frame may be determined by the frame size corresponding to the target camera corresponding to the image frame. If the frame size corresponding to the target camera in the first interface layout is the same as the image size of the image data collected by the target camera, then the image frame corresponding to the target camera can be a complete image frame; If the corresponding frame size is smaller than the image size of the image data collected by the target camera, the image frame corresponding to the target camera may be a preview frame.
  • the first device may arrange the image frames corresponding to the target cameras in the current user interface according to the first interface layout, and display at least part of the image frames corresponding to the target cameras.
  • the current user interface may refer to the current user interface of the first device.
  • the image frames corresponding to each target camera can be displayed on the screen of the first device at one time, and then the first device can display the corresponding images of all target cameras in the current user interface through the screen. image screen.
  • the first device can display only the image frames corresponding to some of the target cameras in the current user interface through the screen.
  • the first device may determine the first interface layout according to the number of target cameras, and display at least part of the image frames corresponding to the target cameras in the current user interface according to the first interface layout.
  • the images corresponding to multiple target cameras can be displayed at the same time, and the user does not need to frequently switch the cameras that need to be viewed, which can simplify user operations, and can flexibly adjust the layout of the first interface according to the number of target cameras, making the interface layout of the user interface Adapting to the number of target cameras, the images of each target camera can be displayed more flexibly.
  • the display mode is more flexible, and can reduce the operation of the user to select settings, meet the needs of the user, increase the stickiness of the user, and improve the interactivity.
  • an image display method is provided, which can be applied to the above-mentioned first device, and the method may include the following steps:
  • step 402 an information list is displayed, and the information list includes device information corresponding to the first device and each second device, and/or camera information corresponding to each camera set on the first device and each second device.
  • the first device After the first device establishes a communication connection with at least one second device, it can obtain the device information corresponding to the first device and each second device, and/or the camera corresponding to each camera set on the first device and each second device information.
  • the device information may include but not limited to information such as device identification, device name, and device type.
  • Device identifiers can be used to uniquely identify electronic devices, and device identifiers may include, but are not limited to, MAC (Media Access Control, Media Access Control) addresses, communication addresses (such as Bluetooth addresses, IP (Internet Protocol, Internet Protocol) addresses), etc.
  • the device type can be used to represent the type of product to which the electronic device belongs, and the device type can include but not limited to mobile phones, smart wearable devices, smart homes, vehicle terminals, etc.
  • the camera information may include but not limited to camera identification, camera type and other information.
  • the camera identification can be used to uniquely identify each camera, and the camera identification can include but not limited to the camera number and the like.
  • the types of cameras can be divided according to the location where the camera is installed on the electronic device, such as including a front camera, rear camera, etc., or according to the functions of the camera on the electronic device, such as monitoring cameras, identification Cameras, etc., may also be classified according to types of cameras, such as wide-angle cameras, depth cameras, and black-and-white cameras.
  • a list control may be displayed on the interface of the camera application, and the user may trigger the list control.
  • the first device detects a trigger operation on the list control
  • the The information list is displayed in the camera application. Through the displayed information list, the user can know each second device currently connected to the first device and/or each currently viewable camera, and select a target camera to be viewed in the information list according to requirements.
  • Step 404 in response to a selection operation on the information list, determine at least one target camera according to the selected device information and/or camera information.
  • the first device When the first device detects a user-triggered selection operation on the information list, it may, in response to the selection operation, obtain the device information and/or camera information selected by the selection operation, and, according to the selected device information and/or camera information Identify the target camera.
  • determining at least one target camera according to the selected device information and/or camera information may include the following situations:
  • the information list only contains the device information of the first device and each second device, then the device information selected by the user can be obtained according to the selection operation triggered by the user, and the target device corresponding to the device information can be determined according to the device information, And identify the camera on the target device as the target camera.
  • all cameras on each target device can be used as target cameras.
  • the first device includes camera a and camera b
  • camera a and camera b can be determined as target cameras at the same time .
  • a camera may also be selected as the target camera for each target device.
  • the user selects the first device and the second device A, wherein the first device includes camera a and camera b, and the second device A includes camera c and camera d, camera a of the first device and camera c of the second device A may be determined as target cameras.
  • the target camera selected on each target device may be randomly selected, or may be preset by the user, or may be selected according to the past period of time (such as within a week, within a month) of each camera on the target device. (inside, etc.) is determined as the number of target cameras, and the camera with the highest number of times for each target device is used as the target camera, etc., but not limited thereto.
  • Case 2 The information list only includes the camera information corresponding to each camera set on the first device and each second device, then the camera information selected by the user can be obtained according to the selection operation triggered by the user, and will correspond to the selected camera information The camera identified as the target camera.
  • the information list can include the device information corresponding to the first device and each second device, and the camera information corresponding to each camera set on the first device and each second device. Then, according to the selection operation triggered by the user, The device information and camera information selected by the user are acquired, and the camera corresponding to the selected device information and camera information is determined as the target camera.
  • Fig. 5 is a schematic diagram of a user selecting a target camera in an embodiment.
  • the first device may display a list control 512 in the camera application interface 510 , and the list control 512 may be triggered when the user needs to select a target camera.
  • an information list 514 may be displayed on the camera application interface 510 .
  • the information list 514 may include device information of the first device and each second device, and camera information on the first device and each second device, such as "local front” means the front camera on the first device , “Native rear camera” means the rear camera on the first device, "Mobile phone A rear” means the rear camera on phone A, etc.
  • the user can select the target camera to be viewed in the information list 514 according to actual needs, such as selecting the front camera on the first device and the rear camera on mobile phone A in (b) of FIG. 5 .
  • the first device after the first device obtains the selected device information and/or camera information, it can determine whether there is a conflicting camera according to the selected device information and/or camera information, and the conflicting camera may refer to a camera Impossible to collect images at the same time, for example, in some electronic devices, the front camera and the rear camera do not support simultaneous image collection and the like. If there is a conflicting camera, prompt information can be generated according to the camera information corresponding to the conflicting camera. The prompt information can be used to prompt the conflicting camera, and the user can reselect the target camera to view based on the prompt information.
  • the first device detects that the second device in the communication connection has changed, such as disconnecting the communication connection with any second device, or establishing a communication connection with a new second device, etc., it can The second device updates the information list in real time to ensure the accuracy of the information list.
  • Step 406 Determine a first interface layout according to the determined number of target cameras.
  • Step 408 acquiring image data collected by each target camera.
  • Step 410 According to the image data, at least part of the image frames respectively corresponding to the target cameras are displayed in the current user interface according to the first interface layout.
  • Step 412 in response to the viewing operation on the target image frame, display the image data collected by the target camera corresponding to the target image frame, wherein the target image frame is an image frame corresponding to any target camera.
  • the image frames corresponding to each target camera may be preview images, and the user may select any image frame in the current user interface to view.
  • the first device detects a viewing operation on the target image frame, it may respond to the viewing operation and display the image data collected by the target camera corresponding to the target image frame, that is, display the complete image frame corresponding to the target camera, and The images captured by the target camera remain consistent.
  • FIG. 6 is a schematic diagram of an interface displaying image data collected by a target camera corresponding to a target image frame in an embodiment.
  • the user interface 610 displays image frames corresponding to sub-camera 1, sub-camera 2, sub-camera 3, and sub-camera 4, and the user performs a corresponding operation for sub-camera 4.
  • the viewing operation (such as a click operation, etc.) of the image frame of the user interface 610, as shown in (b) in FIG. .
  • the return operation can be performed, and the first device can return to the screen shown in Figure 6 according to the return operation.
  • (a) shows the user interface 610.
  • the user can select a target camera to view according to actual needs
  • the first device can be connected at the same time and dynamically coordinate multiple target cameras to work at the same time
  • the user can view the image data collected by any target camera at any time, interactively
  • the method is more convenient and flexible, enhances interactivity, and improves user experience.
  • the step of determining the first interface layout according to the number of target cameras may include: determining that the first interface layout is a draggable layout if the number of target cameras is greater than a second number threshold; If it is less than or equal to the second quantity threshold, it is determined that the first interface layout is a non-draggable layout.
  • the draggable layout may refer to a layout in which the image frame corresponding to the target camera displayed on the user interface will change with the user's dragging operation.
  • the first interface layout is a draggable layout
  • image frames respectively corresponding to the first part of the target cameras may be displayed in the current user interface according to the image data according to the first interface layout.
  • the user can perform a drag operation in the current user interface, and the first device can respond to the drag operation on the current user interface, and display the image frames corresponding to the target cameras in the second part, and the target cameras in the second part are different from those in the first device. Part of the target camera.
  • the screen of the first device cannot display image frames corresponding to all target cameras at one time, and then only the image frames corresponding to the first part of target cameras may be displayed.
  • the number of target cameras in the first part is the second number threshold.
  • the image frames displayed in the current user interface can be changed by dragging to view the image frames corresponding to other target cameras.
  • the second quantity threshold can be set according to actual needs, such as 4, 5, 7, 8, etc., which is not limited here.
  • FIG. 7 is a schematic diagram of an interface for displaying an image frame corresponding to a target camera according to a draggable layout in an embodiment.
  • the target camera may include sub-camera 1, sub-camera 2, sub-camera 3, sub-camera 4, and sub-camera 5, and the second number threshold is 4.
  • the user interface 710 can only display the image images corresponding to the sub-camera 1, sub-camera 2, sub-camera 3, and sub-camera 4 respectively.
  • a drag operation (such as a single-finger swipe operation) can be performed.
  • FIG. 7 is a schematic diagram of an interface for displaying an image frame corresponding to a target camera according to a draggable layout in an embodiment.
  • the target camera may include sub-camera 1, sub-camera 2, sub-camera 3, sub-camera 4, and sub-camera 5, and the second number threshold is 4.
  • the user interface 710 can only display the image images corresponding to the sub-camera 1, sub-camera 2, sub-camera 3, and sub-camera 4
  • the first device may respond to the drag operation, and display the images corresponding to the auxiliary camera position 2, the auxiliary camera position 3, the auxiliary camera position 4, and the auxiliary camera position 5 on the user interface 710. picture.
  • the user interface may display a part of the image frame corresponding to a certain target camera, so that the display of the user interface is more suitable for the user's dragging operation. Operation is smoother.
  • the non-dragable layout may refer to a layout in which the image frame corresponding to the target camera displayed on the user interface will not change with the user's dragging operation. If the first interface layout is a non-dragable layout, then according to the image data, the image frame corresponding to each target camera is displayed in the current user interface according to the first interface layout.
  • FIG. 8 is a schematic diagram of an interface for displaying an image frame corresponding to a target camera according to a non-dragable layout in an embodiment.
  • the target camera may include sub-camera position 1, sub-camera position 2, sub-camera position 3, sub-camera position 4, main position 1 and main position 2, and the second number threshold is 6, then the first device can Image frames corresponding to the sub-camera 1 , the sub-camera 2 , the sub-camera 3 , the sub-camera 4 , the main station 1 and the main station 2 are displayed on the user interface 810 .
  • the layout of the first interface can be flexibly adjusted according to the number of target cameras, and a corresponding interaction mode is provided, which is convenient to operate, can meet different needs of users, and improves the interactivity of the user interface.
  • a manner of determining the first interface layout and displaying in the current user interface based on the first interface layout may include the following steps:
  • Step 902 according to the number of target cameras, determine the corresponding arrangement position and corresponding screen size of each target camera.
  • the arrangement positions corresponding to each target camera can be the position coordinates of the center pixel of the image frame corresponding to each target camera in the user interface, or the four corner pixels (or the lower left corner pixels) of the image frame corresponding to each target camera.
  • the arrangement position corresponding to each target camera can be determined according to one or more of the following rules:
  • Rule 1 According to the order from first to last when the target device corresponding to each target camera establishes a communication connection with the first device, the corresponding arrangement positions of each target camera are sequentially determined.
  • the image frames corresponding to the target cameras belonging to the first device may be arranged in front of the image frames corresponding to the target cameras belonging to the second device, and the image frames corresponding to the target cameras belonging to the second device are then arranged according to the corresponding image frames of the target cameras belonging to the second device.
  • the time when a device establishes a communication connection is arranged sequentially from first to last.
  • Rule 2 According to the order of priority corresponding to each target camera from high to low, the arrangement positions corresponding to each target camera are sequentially determined.
  • the priority corresponding to each target camera can be set according to actual needs, for example, it can be set by the user, or it can be set according to the type of business performed by each target camera.
  • the type of business performed by the target camera may include, but is not limited to, Selfie business, general photo business, video business, surveillance business, and identification business, etc.
  • the priority of the target camera performing the monitoring service may be higher than that of the target camera performing the recording service, but it is not limited thereto.
  • Rule 3 According to the descending order of the number of historical views corresponding to each target camera, the arrangement position corresponding to each target camera is determined in turn.
  • the first device accumulates the historical viewing times corresponding to the target camera. It can obtain the number of historical views corresponding to each target camera in the past preset time period (such as 3 days, 1 day, etc.), and arrange the image frames corresponding to the target camera with a large number of historical views in the corresponding image frame of the target camera with a few historical views. front of the image frame.
  • Rule 4 According to the order from shortest to longest of the time length of each target camera that was also determined as the target camera last time, the corresponding arrangement position of each target camera is determined in turn.
  • the first device can record the camera information corresponding to each target camera determined each time and the determination time, and can obtain that each target camera determined this time was determined as the target camera last time according to the camera information corresponding to each target camera determined this time.
  • the determination time is calculated, and the distance between each target camera determined this time is also determined as the target camera last time.
  • the image frames corresponding to the determined target camera whose distance from the last determined target camera is relatively short may be arranged in the image frames corresponding to the determined target camera whose distance from the last determined target camera is relatively long. front of the image frame.
  • the target cameras determined this time include camera 001, camera 003, and camera 006, wherein the last time camera 001 was determined as the target camera was 2 hours ago, and the last time camera 003 was determined as the target camera was 1 day ago, the last time camera 006 was determined as the target camera was 6 hours ago, then the image frames corresponding to camera 001 can be arranged in front of the image frames corresponding to camera 006, and the image frames corresponding to camera 006 can be arranged In front of the image screen corresponding to the camera 003.
  • the rules for determining the arrangement positions corresponding to each target camera are not limited to the above-mentioned several ways, and other ways may also be used, for example, randomly arranging the image frames of each target camera.
  • FIG. 10 is a schematic diagram of a first interface layout in yet another embodiment. As shown in (a) and (b) in Figure 10, when the number of target cameras is 5 and the number of target cameras is 6, the screen size corresponding to each target camera in the user interface 1010 is the same, and no longer according to The number of target cameras is adaptively adjusted.
  • the first interface layout more image frames corresponding to the target cameras can be displayed in the user interface, and the problem that the frame size of the image frames is too small when the number of target cameras is too large can be avoided, and the display flexibility and interaction can be improved. sex.
  • the frame size corresponding to each target camera may be adjusted according to the number of target cameras.
  • each target camera corresponds to The screen area of the screen size may be the ratio of the display area of the current user interface (less than or equal to the display area of the screen) to the number of target cameras.
  • Fig. 11 is a schematic diagram of the first interface layout in another embodiment.
  • the image size of the image frame corresponding to each target camera in the user interface 1110 is greater than that of each target camera when the number of target cameras is 3
  • the frame size of the corresponding image frame in the user interface 1110 will be adaptively adjusted according to the number of target cameras.
  • the user interface can display an image frame with a larger image size as much as possible, which improves the display flexibility and display effect of the user interface.
  • Step 904 intercept the image frame corresponding to each target camera from the image data corresponding to each target camera.
  • the first device may intercept the image frame corresponding to each target camera from the image data corresponding to each target camera according to the target interception frame, wherein the target interception frame may be proportional to the frame size corresponding to each target camera, so that Ensure that the captured image screen can be displayed normally according to the corresponding screen size.
  • the image frame corresponding to each target camera is intercepted from the image data corresponding to each target camera according to the first clipping frame. Since when the number of target cameras is greater than the first number threshold, the screen sizes determined according to the number of target cameras can be the same, and the screen size will not be adaptively adjusted as the number of target cameras changes. Therefore, a unified The first interception frame intercepts the image frame.
  • FIG. 12A is a schematic diagram of a first intercepting frame in an embodiment.
  • the image data corresponding to the secondary position 1 (that is, the complete image frame) can be intercepted to obtain the secondary position 1 Corresponding image frame, and display the captured image frame according to the screen size corresponding to sub-camera position 1, for example, display the screen size corresponding to sub-camera position 1 at the corresponding arrangement position according to the image size in FIG. 10 .
  • the image frame can be intercepted according to the second clipping frame matched with different frame sizes .
  • FIG. 12B is a schematic diagram of a second clipping frame in an embodiment
  • FIG. 12C is a schematic diagram of a second clipping frame in another embodiment.
  • the number of target cameras such as 3) corresponding to Figure 12B may be less than the number of target cameras corresponding to Figure 12C (such as four)
  • the size of the second clipping frame 1230 in FIG. 12B is larger than the size of the second clipping frame 1240 in FIG. 12C.
  • the size of the second intercepting frame can be adaptively adjusted according to the size of the picture, which can ensure the accuracy of the captured image when it is displayed.
  • the size of the target capture frame is adjusted according to the first ratio, and the target capture frame is adjusted from the first camera according to the adjusted target capture frame.
  • the corresponding image data captures an image frame corresponding to the first camera, where the first camera is any target camera.
  • the size of the target capture frame can be adjusted according to the first ratio, and further, the size of the target capture frame can be reduced according to the first ratio, so that the adjusted size of the target capture frame is smaller than or equal to the size corresponding to the first camera.
  • Fig. 13 is a schematic diagram of adapting the target interception frame in an embodiment.
  • the size of the unadjusted target capture frame 1320 is larger than the image size of the image data 1310 of the sub-camera position 3. If the image frame is directly captured according to the unadjusted target capture frame 1320, it will As a result, the captured image frame contains image content that does not belong to the image data 1310 of the auxiliary camera 3 .
  • the target clipping frame 1320 can be reduced according to the first ratio, and the size of the reduced target clipping frame 1330 is smaller than the image size of the image data 1310 of the sub-camera position 3.
  • the subsequent target interception block 1330 intercepts the image data 1310 of the sub-camera 3 to obtain an image frame corresponding to the sub-camera 3 .
  • the target capture frame can be adaptively adjusted according to the size relationship between the target capture frame and the image size of the image data corresponding to the target camera, which can improve the accuracy of the captured image and improve the image quality. display effect.
  • the image frame captured by the target capture frame in the image data corresponding to the target camera may be at a fixed position of the image data, for example, the image frame captured by the target capture frame may be the middle image area of the image data, etc. , but not limited to this.
  • the user can also move the target capture frame according to implementation requirements, so as to adjust the image position of the image frame captured by the image data corresponding to the target camera.
  • the first device may capture the image frame corresponding to the target camera according to the image position of the moved target capture frame in the image data corresponding to the target camera. It can meet the needs of users for displaying image screens with different image positions, and improve user viscosity.
  • Step 908 according to the corresponding arrangement position and the corresponding frame size of each target camera, display image frames respectively corresponding to at least some of the target cameras in the current user interface.
  • the distance between the size of the first clipping frame and the frame size can be Ratio, compress the captured image frame to obtain an image frame that matches the size of the frame, and display it in the current user interface according to the corresponding arrangement position of each target camera.
  • the screen size and layout position of the image screen can be dynamically adjusted according to the number of target cameras, which can improve the flexibility of displaying the image frames corresponding to multiple target cameras in the user interface, and ensure that the image screen displayed accuracy.
  • another way of determining the first interface layout and displaying in the current user interface based on the first interface layout may include the following steps:
  • Step 1402 acquire the device type corresponding to each target camera, and the device type includes a horizontal screen device or a vertical screen device.
  • the image data collected by the target camera of the device type as a horizontal screen device is a horizontal screen image.
  • the horizontal screen image can refer to an image that is longer than the height.
  • the image data collected by the target camera of a device type that is a vertical screen device is a vertical screen Image, the vertical screen image may refer to an image whose length is smaller than its height.
  • Fig. 15 is a schematic diagram of a horizontal screen image and a vertical screen image in an embodiment. As shown in Figure 15, the length of the horizontal screen image is longer than the height, and the length of the vertical screen image is smaller than the height.
  • the first device may determine whether the image data collected by each target camera is a horizontal screen image or a vertical screen image, so as to determine the device type corresponding to each target camera.
  • Step 1404 determine the horizontal-to-vertical screen ratio between the target camera whose device type is a horizontal screen device and the target camera whose device type is a vertical screen device.
  • the horizontal-to-vertical screen ratio can be a value obtained by dividing the number of target cameras whose device type is a horizontal screen device by the number of target cameras whose device type is a vertical screen device. For example, if the target camera includes 3 target cameras whose device type is a landscape device and 4 target cameras whose device type is a portrait device, the ratio of the horizontal and vertical screens may be 3/4.
  • Step 1406 Determine the layout of the first interface according to the number of target cameras and the ratio of horizontal and vertical screens.
  • the first interface layout may include a screen shape, and the screen shape may be used to define whether the image screen is displayed as a horizontal or vertical screen, where the length of the horizontal screen is longer than the height, and the length of the vertical screen is smaller than the height.
  • FIG. 16A is a schematic diagram of a first interface layout in which the screen shape is a landscape screen in an embodiment. As shown in FIG. 16A , the image frames corresponding to each target camera in the user interface 1610 are arranged in a horizontal format, and the length of the image frame corresponding to each target camera is longer than the height.
  • FIG. 16B is a schematic diagram of a first interface layout in which the screen shape is a vertical screen in an embodiment. As shown in FIG. 16B , the image frames corresponding to each target camera in the user interface 1620 are arranged in a vertical format, and the length of the image frames corresponding to each target camera is smaller than the height.
  • the horizontal and vertical screen ratio is greater than the first ratio threshold, it can be determined that the screen shape is a horizontal screen, and if the horizontal and vertical screen ratio is smaller than the second ratio threshold, it can be determined that the screen shape is a vertical screen, wherein, the first The proportional threshold is greater than the second proportional threshold. If the horizontal-to-vertical screen ratio is greater than the first ratio threshold, it means that most of the target cameras are horizontal-screen devices, and then an image frame whose screen shape is a horizontal screen can be displayed on the user interface. If the aspect ratio is smaller than the second ratio threshold, it means that most of the target cameras are portrait devices, and then the image frame whose frame shape is a vertical frame can be displayed on the image interface.
  • the picture shape may also be determined according to the vertical-horizontal screen ratio between the target camera whose device type is a portrait-screen device and the target camera whose device type is a landscape-screen device.
  • the ratio of the vertical and horizontal screens is greater than the third ratio threshold, determine that the shape of the screen is a vertical screen, and when the ratio of the vertical and horizontal screens is smaller than the fourth ratio threshold, determine that the shape of the screen is a horizontal screen, wherein the third ratio threshold is greater than the fourth ratio threshold.
  • the ratio of the number of target cameras whose device type is a vertical screen device to the number of all target cameras can also be used, and/or the number of target cameras whose device type is a horizontal screen device can account for the number of all target cameras ratio to determine the shape of the screen.
  • the device type is the number of target cameras of a vertical screen device, and the ratio of the number of all target cameras is greater than a preset threshold (such as 80%, 75%, etc.), then determine that the screen shape is a vertical screen; when the device type is a horizontal screen
  • a preset threshold such as 80%, 75%, etc.
  • the screen shape when the horizontal and vertical screen ratio is less than or equal to the first ratio threshold and greater than or equal to the second ratio threshold, it can be determined that the screen shape is the default shape, and the default shape can be uniformly set by product developers.
  • the shape may also be a screen shape selected by the user, which is not limited here.
  • the first interface layout when the number of target cameras is greater than the second number threshold, the first interface layout may be a draggable layout, and when the number of target cameras is less than or When equal to the second quantity threshold, the first interface layout may be a non-draggable layout.
  • Step 1408 according to the picture shape contained in the first interface layout and the device type corresponding to each target camera, determine the image picture matching the picture shape from the image data corresponding to each target camera, and according to the corresponding arrangement position and location of each target camera
  • the corresponding frame sizes display image frames respectively corresponding to at least some of the target cameras.
  • a compression method may be used to obtain the image frame according to the image data corresponding to the target camera. If the device type corresponding to the target camera does not match the determined picture shape, an interception method may be used to obtain the image picture according to the image data corresponding to the target camera.
  • the second camera and the third camera can be any target camera.
  • the shape of the screen is a vertical screen
  • the second camera corresponds to If the device type is a vertical screen device (that is, the device type matches the screen shape), then the image data corresponding to the second camera can be compressed according to the screen size corresponding to the second camera to obtain the image screen corresponding to the second camera, and in The arrangement position corresponding to the second camera displays the image frame corresponding to the second camera.
  • the image screen corresponding to the third camera is intercepted from the image data corresponding to the third camera according to the target vertical capture frame, and the image screen corresponding to the third camera is intercepted according to the third
  • the arrangement positions and screen sizes corresponding to the cameras display the image screens corresponding to the third camera. Wherein, the length of the target vertical interception frame is smaller than the height.
  • the landscape shape is a landscape screen
  • the device type corresponding to the third camera is a landscape device
  • the horizontal version is a horizontal screen
  • the device type corresponding to the second camera is a vertical screen device
  • the arrangement position and frame size corresponding to the two cameras display the image frame corresponding to the second camera.
  • the length of the interception frame of the target horizontal version is smaller than the height.
  • the method of image frame acquisition can be flexibly adjusted according to different image shapes and device types, so that the displayed image frames can contain more image content, and can ensure that the image frames and screen shapes are suitable for each other. To improve the display effect of the user interface.
  • how to capture the image frame through the target vertical capture frame or the target horizontal capture frame can correspond to the capture of the target camera from the image data corresponding to the target camera according to the target capture frame described in the above embodiment.
  • the manner of the image frame is similar, and will not be repeated here.
  • the picture shape adapted to the image data collected by more target cameras can be selected, and the picture shape can be adaptively adjusted, and for different picture shapes and equipment types , the image frame can be obtained in a more appropriate manner, so that the image frame displayed in the user interface can contain more image content, and the display effect is better.
  • an image display method is provided, which can be applied to the above-mentioned first device, and the method may include the following steps:
  • step 1702 an information list is displayed, and the information list includes device information corresponding to the first device and each second device, and/or camera information corresponding to each camera set on the first device and each second device.
  • Step 1704 in response to the selection operation on the information list, determine at least one target camera according to the selected device information and/or camera information.
  • Step 1706 Determine a first interface layout according to the determined number of target cameras.
  • Step 1708 acquire the image data collected by each target camera.
  • Step 1710 According to the image data, at least part of the image frames respectively corresponding to the target cameras are displayed in the current user interface according to the first interface layout.
  • Step 1712 when it is detected that the number of target cameras changes, determine the second interface layout according to the changed number.
  • the second interface layout can be determined according to the changed number, wherein the second interface layout can be different from the above-mentioned
  • the first interface layout implements a solution for dynamically adjusting the interface layout of the user interface in real time according to the number of target cameras.
  • Case 1 The number of target cameras is reduced from the first number to the second number, and the first number is greater than the third number threshold, and the second number is less than or equal to the third number threshold, for example, the third number threshold is 4, and the first number is 5, the second number is 4, and the number of target cameras is reduced from 5 to 4. If the number of target cameras is reduced from the first number to the second number, and the first number is greater than the third number threshold, and the second number is less than or equal to the third number threshold, the corresponding number of each target camera after the change can be re-determined according to the second number. The layout position and the corresponding screen size to obtain the second interface layout.
  • the frame size corresponding to each target camera may be adaptively adjusted according to the number of target cameras. Therefore, in this case, the corresponding arrangement positions and corresponding screen sizes of the changed target cameras may be re-determined according to the second quantity, so as to obtain the second interface layout.
  • the corresponding arrangement positions and corresponding picture sizes of the second number of target cameras are the same as the corresponding arrangement positions and corresponding picture sizes of the second number of target cameras in the first interface layout different.
  • FIG. 18 is a schematic diagram of dynamically adjusting the interface layout of the user interface according to the changing number of target cameras in an embodiment.
  • (a) is a schematic diagram of the first interface layout of the user interface 1810 when the number of target cameras is 5
  • (b) is a schematic diagram of the second interface layout of the user interface 1810 when the number of target cameras becomes 4.
  • Case 2 The number of target cameras is reduced from the first number to the second number, and both the first number and the second number are less than or equal to the third number threshold, for example, the third number threshold is 4, the first number is 4, and the first number is 4.
  • the second number is 3, and the number of target cameras is reduced from 4 to 3. If the number of target cameras is reduced from the first number to the second number, and both the first number and the second number are less than or equal to the third number threshold, the arrangement positions corresponding to the changed target cameras can be re-determined according to the second number and the corresponding screen size to obtain the second interface layout.
  • the frame size corresponding to each target camera may be adaptively adjusted according to the number of target cameras. Therefore, in this case, in the second interface layout, the arrangement positions and corresponding screen sizes corresponding to the second number of target cameras are the same as the corresponding arrangement positions of the second number of target cameras in the first interface layout. The cloth position and the corresponding screen size are different.
  • FIG. 19 is a schematic diagram of dynamically adjusting the interface layout of the user interface according to the changing number of target cameras in another embodiment.
  • (a) is a schematic diagram of the first interface layout of the user interface 1910 when the number of target cameras is 4
  • (b) is a schematic diagram of the second interface layout of the user interface 1910 when the number of target cameras becomes 3.
  • the number of target cameras is reduced from 4 to 3 (sub-camera position 4 is reduced), then the layout positions of sub-camera 1, sub-camera 2, and sub-camera 3 in the layout of the second interface and the corresponding screen sizes, They are all different from the arrangement positions and corresponding screen sizes of the sub-camera position 1, the sub-camera position 2 and the sub-camera position 3 respectively in the first interface layout.
  • Case 3 The number of target cameras is reduced from the first number to the second number, and both the first number and the second number are greater than the third number threshold, for example, the third number threshold is 4, the first number is 6, and the second number is 5, and the number of target cameras is reduced from 6 to 5. If the number of target cameras is reduced from the first number to the second number, and the first number and the second number are greater than the third number threshold, then delete the corresponding arrangement positions and corresponding screen sizes of the reduced target cameras to obtain Second interface layout.
  • the third number threshold is 4, the first number is 6, and the second number is 5, and the number of target cameras is reduced from 6 to 5.
  • the frame sizes determined according to the number of target cameras may be the same, that is, the frame sizes are not adaptively adjusted according to the number of target cameras. Therefore, the arrangement positions and corresponding picture sizes corresponding to the few target cameras can be directly deleted, and the arrangement positions and corresponding picture sizes of the second number of target cameras in the second interface layout can be compared with the second number of target cameras. The corresponding arrangement positions and corresponding screen sizes of the target cameras in the first interface layout are the same.
  • FIG. 20 is a schematic diagram of dynamically adjusting the interface layout of the user interface according to the changing number of target cameras in yet another embodiment.
  • (a) is a schematic diagram of the first interface layout of the user interface 2010 when the number of target cameras is 6, and (b) is a schematic diagram of the second interface layout of the user interface 2010 when the number of target cameras becomes 5.
  • a schematic diagram of the interface layout If the number of target cameras is reduced from 6 to 5 (sub-camera position 5 is reduced), then only the arrangement position and corresponding screen size corresponding to sub-camera position 5 can be deleted.
  • sub-camera position 1, sub-camera position 2.
  • the arrangement positions and corresponding screen sizes of sub-camera position 3 and sub-camera position 4 are the same as those of sub-camera position 1, sub-camera position 2, sub-camera position 3 and sub-camera position 4 in the layout of the first interface.
  • the corresponding layout positions and the corresponding screen sizes are the same.
  • the number of target cameras increases from the first number to the third number, and the first number is less than or equal to the third number threshold, for example, the third number threshold is 4, the first number is 2, the second number is 3, etc. . If the number of target cameras increases from the first number to the third number, and the first number is less than or equal to the third number threshold, re-determine the corresponding arrangement position and corresponding screen size of each target camera after the change according to the third number , to obtain the second interface layout.
  • the number of target cameras increases from the first number to the third number, and the first number is less than or equal to the third number threshold, and the third number is greater than the third number threshold, for example, the third number threshold is 4, and the first number is 3, the second quantity is 5 etc. If the number of target cameras increases from the first number to the third number, and the first number is less than or equal to the third number threshold, and the third number is greater than the third number threshold, then re-determine the corresponding number of each target camera after the change according to the third number. The layout position and the corresponding screen size to obtain the second interface layout.
  • the number of target cameras increases from the first number to the third number, and both the first number and the third number are greater than the third number threshold, for example, the third number threshold is 4, the first number is 5, and the second number 6 and so on. If the number of target cameras increases from the first number to the third number, and the first number and the third number are greater than the third number threshold, then determine the corresponding arrangement positions and corresponding screen sizes of the increased target cameras to obtain Second interface layout.
  • the interface layout of the user interface 2010 changes from (b) to (a).
  • the first interface layout is switched to the second interface layout of the draggable layout; if the number of target cameras is reduced from the first number to the second number, and the first number is greater than the second number threshold, the second number is less than or equal to the second number threshold, the first interface layout of the draggable layout can be switched to the second interface layout of the non-dragable layout.
  • the arrangement positions corresponding to the changed target cameras and the corresponding screen sizes are re-determined to obtain the specific implementation mode of the second interface layout, which can be compared with the target-based methods provided in the above embodiments.
  • the number of cameras determines the layout of the first interface in a similar manner, which will not be repeated here.
  • Step 1714 according to the image data collected by each target camera after change, display the image frame corresponding to each target camera after change in the current user interface according to the second interface layout.
  • the interface layout of the user interface can be dynamically adjusted according to the number of changing target cameras, and a variety of different interface layouts and interaction modes can be smoothly switched to improve the display effect and interactivity of the user interface .
  • the application can also provide the function of synchronous shooting.
  • the above method may further include: in response to the shooting operation, sending a shooting instruction to the target device corresponding to each target camera, where the shooting instruction is used to instruct the target device to control its own target camera to capture an image to obtain a target image; receive the target image sent by each target device The target image is spliced according to the layout of the first interface to obtain a spliced image.
  • the shooting operation can be triggered in the current user interface (for example, the shooting control provided in the current user interface can be clicked).
  • the first device detects a shooting operation, it may send a shooting instruction to the target device corresponding to each target camera. If the target device is the first device, the first device may generate a shooting instruction according to the shooting operation, and control the target camera on the first device to capture images to obtain the target image. If the target device is a second device, the first device can send a shooting instruction to the second device, and the second device can control the target camera on the second device to capture an image according to the received shooting instruction to obtain a target image, and The target image is returned to the first device.
  • the shooting instruction sent to the target device may carry the frame size corresponding to the target camera set on the target device.
  • the shooting instruction is used to instruct the target device to control its own target camera to take pictures to obtain the image to be processed, and intercept the image to be processed according to the screen size carried by the shooting instruction to obtain the target image. After the target device shoots through its own target camera and obtains the image to be processed, it can intercept the image to be processed according to the screen size carried in the shooting instruction to obtain the target image.
  • the first device may stitch each target image according to the first interface layout to obtain a stitched image.
  • the first device may synchronize the stitched image to each target device, further, if the target device is the second device, the first device may send the stitched image to the second device.
  • each target device after each target device captures the image to be processed by its own target camera, it can also directly synchronize the image to be processed to other target devices, so that all electronic devices participating in the shooting can share the lossless captured image.
  • multiple target cameras can simultaneously complete image shooting to form a shooting array
  • the first device can splice the captured images according to the first interface layout to realize automatic typesetting and editing of images captured by multiple target cameras function, and can synchronize the stitched images to all electronic devices involved in the shooting, ensuring data synchronization, reducing user operations, and making the synchronization method more convenient.
  • an image display apparatus 2100 is provided, which can be applied to the above-mentioned first device, and the first device establishes a communication connection with at least one second device.
  • the image display device 2100 may include a camera determination module 2110 , a layout determination module 2120 , a data acquisition module 2130 and a display module 2140 .
  • the camera determining module 2110 is configured to determine at least one target camera from the cameras set on the first device and at least one second device.
  • the layout determining module 2120 is configured to determine the first interface layout according to the determined number of target cameras.
  • the data acquisition module 2130 is configured to acquire the image data collected by each target camera.
  • the display module 2140 is configured to, according to the image data, display in the current user interface at least part of image frames respectively corresponding to the target cameras according to the first interface layout.
  • the image frames corresponding to each target camera have the same frame size, and the image frames corresponding to each target camera are arranged sequentially in rows and/or columns.
  • the camera determination module 2110 is further configured to display an information list, the information list includes the device information corresponding to the first device and each second device, and/or the information set on the first device and each second device Camera information corresponding to each camera; and in response to a selection operation on the information list, determining at least one target camera according to the selected device information and/or camera information.
  • the first interface layout includes the corresponding arrangement position and the corresponding screen size of each target camera.
  • the display module 2140 includes a frame acquisition unit and a display unit.
  • the picture acquisition unit is configured to intercept the image picture corresponding to each target camera from the image data corresponding to each target camera.
  • the picture acquisition unit is further configured to intercept the image frames corresponding to each target camera from the image data corresponding to each target camera according to the first interception frame if the number of target cameras is greater than the first number threshold.
  • the picture acquisition unit is further configured to, if the number of target cameras is less than or equal to the first number threshold, corresponding to each target camera according to the second clipping frame corresponding to the size of the picture corresponding to each target camera.
  • the image data corresponding to each target camera is intercepted from the image data.
  • the picture acquisition unit is further configured to adjust the size of the target capture frame according to the first ratio if the image size of the image data corresponding to the first camera is smaller than the size of the target capture frame, and according to the adjusted
  • the target intercepting frame of is intercepts the image frame corresponding to the first camera from the image data corresponding to the first camera, wherein the first camera is any target camera.
  • the display unit is configured to display in the current user interface at least part of the image frames corresponding to the target cameras according to the corresponding arrangement position and the corresponding frame size of each target camera.
  • the layout determination module 2120 is further configured to obtain the device type corresponding to each target camera, and the device type includes a landscape device or a portrait device; determine that the device type is a target camera of a landscape device, and the device type is The horizontal and vertical screen ratio between the target cameras of the vertical screen device; determine the layout of the first interface according to the number of target cameras and the horizontal and vertical screen ratio.
  • the first interface layout includes a picture shape, a corresponding arrangement position of each target camera, and a corresponding picture size.
  • the layout determination module 2120 is further configured to determine that the screen shape is a horizontal screen if the horizontal and vertical screen ratio is greater than the first ratio threshold; if the horizontal and vertical screen ratio is smaller than the second ratio threshold, determine that the screen shape is a vertical screen; wherein, the first The first ratio threshold is greater than the second ratio threshold, the length of the horizontal screen is larger than the height, and the length of the vertical screen is smaller than the height; and according to the number of target cameras, determine the corresponding arrangement position and corresponding screen size of each target camera.
  • the picture acquisition unit is further configured to: if the shape of the picture is a vertical picture, and the device type corresponding to the second camera is a vertical screen device, then according to the picture size corresponding to the second camera, corresponding to the second camera Compress the image data of the second camera to obtain the image frame corresponding to the second camera; the display unit is further configured to display the image frame corresponding to the second camera at the arrangement position corresponding to the second camera.
  • the picture acquisition unit is further configured to, if the shape of the picture is a vertical picture, and the device type corresponding to the third camera is a horizontal screen device, then intercept the image data corresponding to the third camera according to the target vertical version interception frame.
  • Image screen the display unit is also configured to display the image screen corresponding to the third camera according to the corresponding arrangement position and screen size of the third camera; wherein, the second camera and the third camera are any target cameras, and the target vertical version
  • the length of the clipping box is less than the height.
  • the picture acquisition unit is further configured to: if the landscape shape is a landscape picture, and the device type corresponding to the third camera is a landscape device, according to the picture size corresponding to the third camera, the third camera The corresponding image data is compressed to obtain an image frame corresponding to the third camera; the display unit is further configured to display the image frame corresponding to the third camera at the arrangement position corresponding to the third camera.
  • the picture acquisition unit is further configured to intercept the second camera from the image data corresponding to the second camera according to the target horizontal version interception frame if the shape of the horizontal version is a horizontal version picture, and the device type corresponding to the second camera is a vertical screen device.
  • the corresponding image frame; the display unit is also configured to display the image frame corresponding to the second camera according to the corresponding arrangement position and frame size of the second camera; wherein, the second camera and the third camera are any target cameras, and the target The length of the vertical interception frame is smaller than the height, and the length of the target horizontal interception frame is smaller than the height.
  • the layout determination module 2120 is further configured to determine that the first interface layout is a draggable layout if the number of target cameras is greater than the second number threshold; if the number of target cameras is less than or equal to the second number threshold , it is determined that the first interface layout is a non-dragging layout.
  • the display module 2140 is further configured to, if the first interface layout is a draggable layout, display image frames respectively corresponding to the target cameras of the first part in the current user interface according to the first interface layout according to the image data; if the first interface If the layout is not draggable, then according to the image data, the image frame corresponding to each target camera is displayed in the current user interface according to the first interface layout.
  • the display module 2140 is further configured to, in response to the drag operation on the current user interface, display image frames respectively corresponding to the target cameras in the second part, where the target cameras in the second part are different from the target cameras in the first part Camera.
  • the layout determining module 2120 is further configured to determine the second interface layout according to the changed number when it is detected that the number of target cameras changes.
  • the layout determination module 2120 is further configured to reduce the number of target cameras from the first number to the second number, and the first number is greater than the third number threshold, and the second number is less than or equal to the third number threshold , or the first number and the second number are both less than or equal to the third number threshold, then re-determine the corresponding arrangement position and corresponding screen size of each target camera after the change according to the second number, so as to obtain the second interface layout; and If the number of target cameras is reduced from the first number to the second number, and the first number and the second number are greater than the third number threshold, then delete the corresponding arrangement positions and corresponding screen sizes of the reduced target cameras to obtain Second interface layout.
  • the layout determination module 2120 is further configured to if the number of target cameras increases from the first number to a third number, and the first number is less than or equal to the third number threshold, and the third number is greater than the third number threshold , or the first number and the third number are both less than or equal to the third number threshold, then re-determine the corresponding arrangement position and corresponding screen size of each target camera after the change according to the third number, so as to obtain the second interface layout; and If the number of target cameras increases from the first number to the third number, and the first number and the third number are greater than the third number threshold, then determine the corresponding arrangement positions and corresponding screen sizes of the increased target cameras to obtain Second interface layout.
  • the display module 2140 is further configured to display the image frames corresponding to the changed target cameras in the current user interface according to the second interface layout according to the image data collected by the changed target cameras.
  • the display module 2140 is further configured to display the image data collected by the target camera corresponding to the target image frame in response to the viewing operation on the target image frame, wherein the target image frame is the image data corresponding to any target camera image screen.
  • the above-mentioned image display device 2100 further includes a photographing module and a splicing module.
  • the photographing module is configured to send a photographing instruction to the target device corresponding to each target camera in response to the photographing operation, and the photographing instruction is configured to instruct the target device to control its own target camera to capture an image to obtain a target image.
  • the first interface layout includes the screen size corresponding to each target camera; the shooting instruction carries the screen size corresponding to the target camera set on the target device; the shooting instruction is configured to instruct the target device to control its own target camera to perform Shoot to obtain the image to be processed, and intercept the image to be processed according to the screen size carried by the shooting instruction to obtain the target image.
  • the splicing module is further configured to acquire target images obtained by each target device, and splice the target images according to the first interface layout to obtain a spliced image.
  • the splicing module is further configured to synchronize the spliced images to respective target devices.
  • the first device may determine the first interface layout according to the number of target cameras, and display at least part of the image frames corresponding to the target cameras in the current user interface according to the first interface layout.
  • the images corresponding to multiple target cameras can be displayed at the same time, and the user does not need to frequently switch the cameras to be viewed, which simplifies user operations, and can flexibly adjust the layout of the first interface according to the number of target cameras, so that the interface of the current user interface
  • the layout is adapted to the number of target cameras, and the images of each target camera can be displayed more flexibly.
  • the display mode is more flexible, and can reduce the operation of the user to select settings, meet the needs of the user, increase the stickiness of the user, and improve the interactivity.
  • Fig. 22 is a structural block diagram of an electronic device in one embodiment.
  • an electronic device 2200 may include one or more of the following components: a processor 2210, a memory 2220 coupled to the processor 2210, wherein the memory 2220 may store one or more computer programs, one or more computer programs It may be configured to implement the methods described in the foregoing embodiments when executed by one or more processors 2210 .
  • Processor 2210 may include one or more processing cores.
  • the processor 2210 uses various interfaces and lines to connect various parts of the entire electronic device 2200, and executes or executes instructions, programs, code sets or instruction sets stored in the memory 2220, and calls data stored in the memory 2220 to execute Various functions of the electronic device 2200 and processing data.
  • the processor 2210 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware.
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 2210 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, and the like.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the CPU mainly handles the operating system, user interface and application programs, etc.
  • the GPU is used to render and draw the displayed content
  • the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may also not be integrated into the processor 2210, but implemented by a communication chip alone.
  • the memory 2220 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory, ROM).
  • the memory 2220 may be used to store instructions, programs, codes, sets of codes or sets of instructions.
  • the memory 2220 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system and instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the foregoing method embodiments, and the like.
  • the storage data area can also store data created by the electronic device 2200 during use, and the like.
  • the electronic device 2200 may include more or less structural elements than those in the above structural block diagram, for example, including a power module, a physical button, a WiFi (Wireless Fidelity, wireless fidelity) module, a speaker, a Bluetooth module, a sensor, etc. , and may not be limited here.
  • the embodiment of the present application discloses a computer-readable storage medium, which stores a computer program, wherein, when the computer program is executed by a processor, the methods described in the above-mentioned embodiments are implemented.
  • the embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program can be executed by a processor to implement the methods described in the foregoing embodiments.
  • the processes in the methods of the above embodiments can be realized through computer programs to instruct related hardware, and the programs can be stored in a non-volatile computer-readable storage medium When the program is executed, it may include the processes of the embodiments of the above-mentioned methods.
  • the storage medium may be a magnetic disk, an optical disk, a ROM, or the like.
  • Non-volatile memory may include ROM, Programmable ROM (PROM), Erasable PROM (Erasable PROM, EPROM), Electrically Erasable PROM (Electrically Erasable PROM, EEPROM) or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as external cache memory.
  • RAM can take many forms, such as static RAM (Static RAM, SRAM), dynamic RAM (Dynamic Random Access Memory, DRAM), synchronous DRAM (synchronous DRAM, SDRAM), double data rate SDRAM (Double Data Rate) Data Rate SDRAM, DDR SDRAM), enhanced SDRAM (Enhanced Synchronous DRAM, ESDRAM), synchronous link DRAM (Synchlink DRAM, SLDRAM), memory bus direct RAM (Rambus DRAM, RDRAM) and direct memory bus dynamic RAM (Direct Rambus DRAM) , DRDRAM).
  • the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, located in one place, or distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

Abstract

本申请实施例公开了一种图像显示方法、装置、电子设备及计算机可读存储介质。该方法应用于第一设备(10),所述第一设备(10)与至少一个第二设备(20)建立通信连接;所述方法包括:从所述第一设备(10)及所述至少一个第二设备(20)上设置的各个摄像头中,确定至少一个目标摄像头;根据确定的目标摄像头的数量,确定第一界面布局;获取各个所述目标摄像头采集的图像数据;根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面。上述的图像显示方法、装置、电子设备及计算机可读存储介质,能够更加灵活地显示各个目标摄像头的图像画面,贴合用户需求,提高了用户粘度。

Description

图像显示方法、装置、电子设备及计算机可读存储介质
相关交叉引用
本申请要求于2021年11月25日提交中国专利局、申请号为202111413006.8、发明名称为“图像显示方法、装置、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人机交互技术领域,具体涉及图像显示方法、装置、电子设备及计算机可读存储介质。
背景技术
目前,为了满足用户利用多个不同的电子设备进行图像采集的需求,市面上出现了具有相机多机位功能的电子设备,该电子设备可支持同时与至少一个其他设备连接,能够获取其它设备采集的图像,实现图像共享。对于支持相机多机位功能的电子设备,在图像显示仍存在优化需求。
发明内容
(一)要解决的技术问题
本申请实施例公开了一种图像显示方法、装置、电子设备及计算机可读存储介质,能够更加灵活地显示各个目标摄像头的图像画面,贴合用户需求,提高了用户粘度。
(二)技术方案
本申请实施例公开了一种图像显示方法,应用于第一设备,所述第一设备与至少一个第二设备建立通信连接;所述方法包括:从所述第一设备及所述至少一个第二设备上设置的各个摄像头中,确定至少一个目标摄像头;根据目标摄像头的数量,确定第一界面布局;获取各个所述目标摄像头采集的图像数据;根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面。
本申请实施例公开了一种图像显示装置,应用于第一设备,所述第一设备与至少一个第二设备建立通信连接;所述装置包括:摄像头确定模块,被配置为从所述第一设备及所述至少一个第二设备上设置的各个摄像头中,确定至少一个目标摄像头;布局确定模块,被配置为根据目标摄像头的数量,确定第一界面布局;数据获取模块,被配置为获取各个所述目标摄像头采集的图像数据;显示模块,被配置为根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面。
本申请实施例公开了一种电子设备,包括存储器及处理器,所述存储器中存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器实现如上所述的方法。
本申请实施例公开了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的方法。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用来解释本公开的原理。
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为一个实施例中图像显示方法的示意图;
图2为一个实施例中图像显示方法的流程图;
图3A为一个实施例中第一界面布局的示意图;
图3B为另一个实施例中第一界面布局的示意图;
图4为另一个实施例中图像显示方法的流程图;
图5为一个实施例中用户选择目标摄像头的示意图;
图6为一个实施例中显示与目标图像画面对应的目标摄像头采集的图像数据的界面示意图;
图7为一个实施例中按照可拖动布局显示目标摄像头对应的图像画面的界面示意图;
图8为一个实施例中按照不可拖动布局显示目标摄像头对应的图像画面的界面示意图;
图9为一个实施例中确定第一界面布局,以及基于第一界面布局在当前用户界面中进行显示的流程图;
图10为又一个实施例中第一界面布局的示意图;
图11为还一个实施例中第一界面布局的示意图;
图12A为一个实施例中第一截取框的示意图;
图12B为一个实施例中第二截取框的示意图;
图12C为另一个实施例中第二截取框的示意图;
图13为一个实施例中对目标截取框进行自适应的示意图;
图14为另一个实施例中确定第一界面布局,以及基于第一界面布局在当前用户界面中进行显示的流程图;
图15为一个实施例中横屏图像与竖屏图像的示意图;
图16A为一个实施例中画面形状为横版画面的第一界面布局的示意图;
图16B为一个实施例中画面形状为竖版画面的第一界面布局的示意图;
图17为又一个实施例中图像显示方法的流程图;
图18为一个实施例中根据变化的目标摄像头的数量,动态调整用户界面的界面布局的示意图;
图19为另一个实施例中根据变化的目标摄像头的数量,动态调整用户界面的界面布局的示意图;
图20为又一个实施例中根据变化的目标摄像头的数量,动态调整用户界面的界面布局的示意图;
图21为一个实施例中图像显示装置的框图;
图22为一个实施例中电子设备的结构框图。
具体实施方式
为了能够更清楚地理解本公开的上述目的、特征和优点,下面将对本公开的方案进行进一步描述。需要说明的是,在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本公开,但本公开还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本公开的一部分实施例,而不是全部的实施例。
本公开的说明书和权利要求书中的术语“第一”和“第二”等是用来区别不同的对象,而不是用来描述对象的特定顺序。例如,第一摄像头和第二摄像头是为了区别不同的摄像头,而不是为了描述摄像头的特定顺序。
在本公开实施例中,“示例性的”或者“例如”等词来表示作例子、例证或说明。本公开实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念,此外,在本公开实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。
对于市面上支持相机多机位功能的电子设备,该电子设备每次只可与一个摄像头,也即,用户只可选择一个摄像头(可以是电子设备上的摄像头或是其它电子设备上的摄像头),电子设备显示用户选择的摄像头所采集的图像,无法同时显示多个摄像头采集的图像。当用户想要查看其它摄像头采集的图像时,需要重新选择的摄像头,电子设备才会切换显示重新选择的摄像头所采集的图像,该交互方式操作繁琐,且当电子设备连接的其它设备的数量不断增加时,用户会对已查看的摄像头产生混淆。因此,对于持相机多机位功能的电子设备,在图像显示及交互方面仍存在优化需求。
本申请实施例提供一种图像显示方法、装置、电子设备及计算机可读存储介质,能够更加灵活地显示各个目标摄像头的图像画面,贴合用户需求,提高了用户粘度。此外,可简化用户操作,提高交互便捷性。
本申请实施例提供一种图像显示方法,应用于第一设备,所述第一设备与至少一个第二设备建立通信连接;所述方法包括:从所述第一设备及所述至少一个第二设备上设置的各个摄像头中,确定至少一个目标摄像头;根据确定的所述目标摄像头的数量,确定第一界面布局;获取各个所述目标摄像头采集的图像数据;根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面。
在一个实施例中,所述从所述第一设备及所述至少一个第二设备上设置的各个摄像头中,确定至少一个目标摄像头,包括:展示信息列表,所述信息列表包括所述第一设备及各个所述第二设备分别对应的设备信息,和/或所述第一设备及各个所述第二设备上设置的各个摄像头对应的摄像头信息;响应于针对所述信息列表的选择操作,根据选择的设备信息和/或摄像头信息确定至少一个目标摄像头。
在一个实施例中,在所述第一界面布局中,每一所述目标摄像头对应的图像画面的画面尺寸相同,且每一所述目标摄像头对应的图像画面按行和/或列依次进行排布。
在一个实施例中,所述第一界面布局包括各个所述目标摄像头对应的排布位置及对应的画面尺寸;所述根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面,包括:从各个所述目标摄像头对应的图像数据中截取各个所述目标摄像头对应的图像画面;按照所述各个所述目标摄像头对应的排布位置及对应的画面尺寸,在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面。
在一个实施例中,所述从各个所述目标摄像头对应的图像数据中截取各个所述目标摄像头对应的图像画面,包括:若所述目标摄像头的数量大于第一数量阈值,则根据第一截取框从各个所述目标摄像头对应的图像数据中,截取各个所述目标摄像头对应的图像画面。
在一个实施例中,所述从各个所述目标摄像头对应的图像数据中截取各个所述目标摄像头对应的图像画面,包括:若所述目标摄像头的数量小于或等于第一数量阈值,则分别根据与各个所述目标摄像头对应的画面尺寸匹配的第二截取框,从各个所述目标摄像头对应的图像数据中,截取各个所述目标摄像头对应的图像画面。
在一个实施例中,所述从各个所述目标摄像头对应的图像数据中截取各个所述目标摄像头对应的图像画面,包括:若第一摄像头对应的图像数据的图像尺寸小于目标截取框的尺寸,则按照第一比例对所述目标截取框的尺寸进行调整,并根据调整后的目标截取框从所述第一摄像头对应的图像数据截取所述第一摄像头对应的图像画面,其中,所述第一摄像头为任一所述目标摄像头。
在一个实施例中,所述根据目标摄像头的数量,确定第一界面布局,包括:获取各个目标摄像头对应的设备类型,所述设备类型包括横屏设备或竖屏设备;确定设备类型为所述横屏设备的目标摄像头,与设备类型为所述竖屏设备的目标摄像头之间的横竖屏比例;根据所述目标摄像头的数量及所述横竖屏比例,确定第一界面布局。
在一个实施例中,所述第一界面布局包括画面形状、各个所述目标摄像头对应的排布位置及对应的画面尺寸;所述根据所述目标摄像头的数量及所述横竖屏比例,确定第一界面布局,包括:若所述横竖屏比例大于第一比例阈值,则确定所述画面形状为横版画面;若所述横竖屏比例小于第二比例阈值,则确定所述画面形状为竖版画面;其中,所述第一比例阈值大于所述第二比例阈值,所述横版画面的长大于高,所述竖版画面的长小于高;根据所述目标摄像头的数量,确定所述各个所述目标摄像头对应的排布位置及对应的画面尺寸。
在一个实施例中,所述根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面,包括:若所述画面形状为所述竖版画面,且第二摄像头对应的设备类型为竖屏设备,则根据所述第二摄像头对应的画面尺寸,对所述第二摄像头对应的图像数据进行压缩,得到所述第二摄像头对应的图像画面,并在所述第二摄像头对应的排布位置显示所述第二摄像头对应的图像画面;若所述画面形状为所述竖版画面,且第三摄像头对应的设备类型为横屏设备,则根据目标竖版截取框从所述第三摄像头对应的图像数据中截取所述第三摄像头对应的图像画面,并根据所述第三摄像头对应的排布位置及画面尺寸显示所述第三摄像头对应的图像画面;其中,所述第二摄像头及第三摄像头均为任一目标摄像头,目标竖版截取框的长小于高。
在一个实施例中,所述根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面,包括:若所述横版形状为所述横版画面,且第三摄像头对应的设备类型为横屏设备,则根据所述第三摄像头对应的画面尺寸,对所述第三摄像头对应的图像数据进行压缩,得到所述第三摄像头对应的图像画面,并在所述第三摄像头对应的排布位置显示所述第三摄像头对应的图像画面;若所述横版形状为所述横版画面,且第二摄像头对应的设备类型为竖屏设备,则根据目标横版截取框从所述第二摄像头对应的图像数据中截取所述第二摄像头对应的图像画面,并根据所述第二摄像头对应的排布位置及画面尺寸显示所述第二摄像头对应的图像画面;其中,所述第二摄像头及第三摄像头均为任一目标摄像头,目标竖版截取框的长小于高,所述目标横版截取框的长小于高。
在一个实施例中,所述根据目标摄像头的数量,确定第一界面布局,包括:若所述目标摄像头的数量大于第二数量阈值,则确定第一界面布局为可拖动布局;若所述目标摄像头的数量小于或等于所述第二数量阈值,则确定第一界面布局为不可拖动布局;所述根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面,包括:若所述第一界面布局为可拖动布局,则根据所述图像数据,按照所述第一界面布局在当前用户界面中显示第一部分的目标摄像头分别对应的图像画面;若所述第一界面布局为不可拖动布局,则根据所述图像数据,按照所述第一界面布局在当前用户界面中显示每一所述目标摄像头对应的图像画面。
在一个实施例中,在所述按照所述第一界面布局在当前用户界面中显示第一部分的目标摄像头分别对应的图像画面之后,所述方法还包括:响应于针对所述当前用户界面的拖动操作,显示第二部分的目标摄像头分别对应的图像画面,所述第二部分的目标摄像头区别于所述第一部分的目标摄像头。
在一个实施例中,所述方法还包括:在检测到所述目标摄像头的数量发生变化时,根据 变化后的数量确定第二界面布局;根据变化后的各个目标摄像头采集的图像数据,按照所述第二界面布局,在当前用户界面中显示所述变化后的各个目标摄像头对应的图像画面。
在一个实施例中,在检测到所述目标摄像头的数量发生变化时,根据变化后的数量确定第二界面布局,包括:若所述目标摄像头的数量从第一数量减少至第二数量,且所述第一数量大于第三数量阈值,所述第二数量小于或等于所述第三数量阈值,或所述第一数量及第二数量均小于或等于所述第三数量阈值,则根据所述第二数量重新确定变化后的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局;若所述目标摄像头的数量从第一数量减少至第二数量,且所述第一数量及第二数量均大于所述第三数量阈值,则删除减少的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局。
在一个实施例中,在检测到所述目标摄像头的数量发生变化时,根据变化后的数量确定第二界面布局,包括:若所述目标摄像头的数量从第一数量增加至第三数量,且所述第一数量小于或等于第三数量阈值,所述第三数量大于第三数量阈值,或所述第一数量及第三数量均小于或等于所述第三数量阈值,则根据所述第三数量重新确定变化后的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局;若所述目标摄像头的数量从第一数量增加至第三数量,且所述第一数量及第三数量均大于所述第三数量阈值,则确定增加的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局。
在一个实施例中,所述方法还包括:响应于针对目标图像画面的查看操作,显示与所述目标图像画面对应的目标摄像头采集的图像数据,其中,所述目标图像画面为任一目标摄像头对应的图像画面。
在一个实施例中,所述方法还包括:响应于拍摄操作,向各个所述目标摄像头对应的目标设备发送拍摄指令,所述拍摄指令用于指示所述目标设备控制自身的目标摄像头进行图像拍摄,得到目标图像;获取各个所述目标设备得到的目标图像,并按照所述第一界面布局对所述目标图像进行拼接,得到拼接图像。
在一个实施例中,所述第一界面布局包括各个所述目标摄像头对应的画面尺寸;所述拍摄指令携带有设置在目标设备上的目标摄像头对应的画面尺寸;所述拍摄指令用于指示所述目标设备控制自身的目标摄像头进行拍摄,得到待处理图像,并按照所述拍摄指令携带的画面尺寸对所述待处理图像进行截取,得到目标图像。
在一个实施例中,在所述得到拼接图像后,所述方法还包括:将所述拼接图像分别同步到各个所述目标设备。
本申请实施例公开一种图像显示装置,应用于第一设备,所述第一设备与至少一个第二设备建立通信连接;所述装置包括:摄像头确定模块,被配置为从所述第一设备及所述至少一个第二设备上设置的各个摄像头中,确定至少一个目标摄像头;布局确定模块,被配置为根据目标摄像头的数量,确定第一界面布局;数据获取模块,被配置为获取各个所述目标摄像头采集的图像数据;显示模块,被配置为根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面。
本申请实施例公开一种电子设备,包括存储器及处理器,所述存储器中存储有计算机程序,所述处理器被配置为执行所述计算机程序时实现本申请实施例公开的任意一种图像显示方法。
本申请实施例公开一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现本申请实施例公开的任意一种图像显示方法。
图1为一个实施例中图像显示方法的示意图。如图1所示,第一设备10可与至少一个第二设备20建立通信连接,该第一设备10及第二设备20可包括但不限于手机、平板电脑、智能可穿戴设备(如智能眼镜、智能手表等)、笔记本电脑、PC(Personal Computer,个人计算机)、数码相机、监控设备等。第一设备10与第二设备20之间可建立无线通信连接,如WiFi连接、蓝牙连接、移动网络通信连接等,也可以建立有线通信连接,本申请实施例第一设备10与第二设备20的具体连接方式不作限定。
第一设备10及各个第二设备20上均可设置有一个或多个摄像头,例如,第一设备10可以是手机,可包括前置摄像头及后置摄像头,第二设备20可以是监控设备,可包括一个摄像头等,但不限于此。第一设备10可从第一设备10及各个第二设备20上设置的各个摄像头中确定至少一个目标摄像头,并根据确定的目标摄像头的数量,确定第一界面布局。第一设备10可获取各个目标摄像头采集的图像数据,并根据该图像数据,按照第一界面布局在当前用户界面中显示至少部分目标摄像头分别对应的图像画面。
如图2所示,在一个实施例中,提供一种图像显示方法,可应用于上述的第一设备,该方法可包括以下步骤:
步骤210,从第一设备及至少一个第二设备上设置的各个摄像头中,确定至少一个目标摄像头。
第一设备可与至少一个第二设备建立通信连接。在一些实施例中,第一设备与各个第二设备中均可安装有多机位应用程序,该多机位应用程序可用于提供多个电子设备之间共享摄 像头采集的图像的功能。若第一设备与第二设备在多机位应用程序中对应相同的账号标识,说明第一设备及第二设备属于同一用户,则第一设备可通过多机位应用程序向对应相同账号标识的第二设备发送连接请求,以与对应相同账号标识的第二设备建立通信连接。其中,账号标识可包括但不限于账号ID(Identity,身份标识号)、账号名称等。
若第一设备与第二设备在多机位应用程序中对应不同的账号标识,则第一设备可通过多机位应用程序,与对应不同的账号标识建立短距离通信连接,比如蓝牙连接、红外连接等,但不限于此。具体地,第一设备及第二设备均可开启多机位应用程序,在第一设备与第二设备分别对应不同的账号标识的情况下,可按照预设的安全交互方式触发第一设备与第二设备建立短距离通信连接。可选地,该预设的安全交互方式可以是近距离交互方式,例如第一设备与第二设备“碰一碰”的方式,或是第一设备通过多机位应用程序显示账号标识图像(如二维码等),第二设备通过摄像头采集该账号标识图像的方式,或是第一设备与第二设备均开启RFID(Radio Frequency Identification,无线射频识别),并将第二设备放在第一设备上进行“刷卡”的方式等,但不限于此。第一设备及第二设备通过多机位应用程序中的账号标识采用相应的方式建立通信连接,可提高图像数据传输的安全性。
第一设备及各个第二设备上可设置有一个或多个摄像头,第一设备可从第一设备及第二设备上设置的各个摄像头中,确定至少一个目标摄像头,该目标摄像头可指的是需要在当前用户界面中显示相应的图像画面的摄像头。可选地,确定的至少一个目标摄像头,可以是属于不同电子设备的摄像头,例如,目标摄像头可包括第一设备的后置摄像头、第二设备A的前置摄像头及第二设备B的后置摄像头等。可选地,确定的至少一个目标摄像头,也可以是属于同一电子设备的摄像头,例如,目标摄像头可包括第二设备A上设置的两个摄像头等。确定的至少一个目标摄像头也可同时包括属于不同电子设备的摄像头以及属于同一个电子设备的摄像头,例如,目标摄像头可包括第一设备的后置摄像头、第二设备A上设置的两个摄像头等。
步骤220,根据确定的目标摄像头的数量,确定第一界面布局。
第一设备可根据确定的目标摄像头的数量,确定第一界面布局,该第一界面布局可用于定义各个目标摄像头对应的图像画面在当前用户界面中的显示方式。目标摄像头的数量不同,可对应不同的第一界面布局。在一些实施例中,第一界面布局可包括各个目标摄像头对应的排布位置及对应的画面尺寸,其中,排布位置可指的是目标摄像头对应的图像画面在当前用户界面中的位置,画面尺寸可指的是目标摄像头对应的图像画面在当前用户界面中显示的大小。
在一些实施例中,在第一界面布局中每一目标摄像头对应的图像画面可均匀排布,在第一界面布局中,每一目标摄像头对应的图像画面的画面尺寸可相同,且每一目标摄像头对应的图像画面按行和/或列依次进行排布,也即,各个目标摄像头对应的图像画面以相同的画面尺寸,按照对应的排布位置依次排布在当前用户界面中。示例性地,图3A为一个实施例中第一界面布局的示意图。如图3A所示,目标摄像头可包括主机位1(第一设备上的一个摄像头)及副机位1(第二设备上的一个摄像头),主机位1对应的显示框312用于表示主机位1对应的图像画面在当前用户界面310中的排布位置及画面尺寸,副机位1对应的显示框314用于表示副机位1对应的图像画面在当前用户界面310中的排布位置及画面尺寸,其中,主机位1与副机位1对应的画面尺寸相同,且主机位1的图像画面排布在副机位1的图像画面的上方。
作为另一种实施方式,目标摄像头对应的图像画面的画面尺寸也可不同。示例性地,图3B为另一个实施例中第一界面布局的示意图。如图3B所示,目标摄像头可包括副机位1、副机位2及副机位3(属于至少一个第二设备上的3个不同的摄像头),副机位1对应的显示框322、副机位2对应的显示框324及副机位3对应的显示框326,分别用于表示副机位1、副机位2及副机位3分别对应的图像画面在当前用户界面310中的排布位置及画面尺寸。其中,副机位1与副机位2对应的画面尺寸相同,但与副机位3对应的画面尺寸不同,且副机位1的图像画面排布在副机位2的图像画面的左侧,副机位1及副机位2的图像画面排布在副机位3的图像画面的上方。
步骤230,获取各个目标摄像头采集的图像数据。
在第一设备确定目标摄像头后,可从各个目标摄像头对应的目标设备获取各个目标摄像头采集的图像数据,其中,目标设备可指的是包含有目标摄像头的电子设备。若目标设备为第一设备,第一设备可直接获取目标摄像头采集的图像数据;若目标设备为第二设备,则第一设备可通过与该目标设备之间的通信连接,接收该目标设备发送的通过目标摄像头采集的图像数据。
例如,目标摄像头包括第二设备A的摄像头1及第二设备B的摄像头2,则第二设备A可将通过摄像头1采集的图像数据发送给第一设备,第二设备B可将通过摄像头2采集的图像数据发送给第二数据。
可选地,上述的图像数据可以是通过目标摄像头实时采集的图像数据,该图像数据可用于显示目标摄像头采集的每一帧完整的图像。上述的图像数据也可以不是通过目标摄像头实 时采集的图像数据,例如,可以是目标摄像头实时采集的图像数据中间隔一定帧数(如间隔2帧、3帧、5帧等)的图像数据,也可以是目标摄像头拍摄的一帧图像数据或某几帧图像数据(如一段视频)等,但不限于此。
步骤240,根据图像数据,按照第一界面布局在当前用户界面中显示至少部分目标摄像头分别对应的图像画面。
在一些实施例中,可根据各个目标摄像头采集的图像数据,生成各个目标摄像头对应的图像画面。可选地,图像画面可以是完整的图像画面,也即,该图像画面可以是各个目标摄像头对应的每帧图像数据,图像画面的图像质量(如图像分辨率等)及图像内容等均与图像数据保持一致。可选地,图像画面也可以是图像数据的预览画面(即非完整的图像画面),图像画面可以是对图像数据进行压缩得到的图像,也可以是对图像数据进行截取所得到的图像等。
在一些实施例中,图像画面是完整的图像画面还是预览画面,可以是由图像画面对应的目标摄像头所对应的画面尺寸决定的。若第一界面布局中与目标摄像头对应的画面尺寸与该目标摄像头采集的图像数据的图像尺寸相同,则该目标摄像头对应的图像画面可以是完整的图像画面;若第一界面布局中与目标摄像头对应的画面尺寸小于该目标摄像头采集的图像数据的图像尺寸,则该目标摄像头对应的图像画面可以是预览画面。
第一设备可按照第一界面布局在当前用户界面中对各个目标摄像头对应的图像画面进行排布,并显示至少部分目标摄像头分别对应的图像画面。其中,当前用户界面可指的是第一设备当前的用户界面。可选地,在目标摄像头的数量较少时,各个目标摄像头对应的图像画面可在第一设备的屏幕上一次显示,则第一设备可通过屏幕在当前用户界面中显示所有目标摄像头分别对应的图像画面。在目标摄像头的数量较多时,各个目标摄像头对应的图像画面无法在第一设备的屏幕上同时显示,则第一设备可通过屏幕在当前用户界面中仅显示部分目标摄像头分别对应的图像画面。
在本申请实施例中,第一设备可根据目标摄像头的数量确定第一界面布局,并按照该第一界面布局在当前用户界面中显示至少部分目标摄像头分别对应的图像画面,在当前用户界面中可同时显示多个目标摄像头分别对应的图像画面,用户不需要频繁对需要查看的摄像头进行切换,可简化用户操作,且可根据目标摄像头的数量灵活调整第一界面布局,使用户界面的界面布局与目标摄像头的数量适配,能够更加灵活地显示各个目标摄像头的图像画面。相较于相关技术中用户提前设置界面布局的方式,显示方式更加灵活,且可减少用户选择设置的操作,贴合用户需求,提高了用户粘度,且可提高交互性。
如图4所示,在另一个实施例中,提供一种图像显示方法,可应用于上述的第一设备,该方法可包括以下步骤:
步骤402,展示信息列表,该信息列表包括第一设备及各个第二设备分别对应的设备信息,和/或第一设备及各个第二设备上设置的各个摄像头对应的摄像头信息。
第一设备在与至少一个第二设备建立通信连接后,可获取第一设备及各个第二设备分别对应的设备信息,和/或第一设备及各个第二设备上设置的各个摄像头对应的摄像头信息。
其中,设备信息可包括但不限于设备标识、设备名称、设备种类等信息。设备标识可用于唯一标识电子设备,设备标识可包括但不限于MAC(Media Access Control,介质访部控制)地址、通信地址(如蓝牙地址、IP(Internet Protocol,网际协议)地址)等。设备种类可用于表征电子设备所属的产品类类型,设备种类可包括但不限于手机、智能可穿戴设备、智能家居、车载终端等。
摄像头信息可包括但不限于摄像头标识、摄像头类型等信息。摄像头标识可用于唯一标识各个摄像头,摄像头标识可包括但不限于摄像头编号等。可选地,摄像头类型可按照摄像头在电子设备的设置位置进行划分,如可包括前置摄像头、后置摄像头等,也可按照摄像头在电子设备的功能进行划分,如可包括监控摄像头、身份识别摄像头等,也可按照摄像头的种类进行划分,如广角摄像头、深度摄像头、黑白摄像头等。
在一些实施例中,在第一设备进入相机应用后,相机应用的界面中可显示有列表控件,用户可触发该列表控件,当第一设备检测到针对该列表控件的触发操作时,可在相机应用中展示信息列表。用户通过展示的信息列表可获知第一设备当前连接的各个第二设备和/或当前可查看的各个摄像头,并根据需求在信息列表中选择所需查看的目标摄像头。
步骤404,响应于针对信息列表的选择操作,根据选择的设备信息和/或摄像头信息确定至少一个目标摄像头。
第一设备在检测到用户触发的针对信息列表的选择操作时,可响应于该选择操作,获取选择操作所选择的设备信息和/或摄像头信息,并根据所选择的设备信息和/或摄像头信息确定目标摄像头。在一些实施例中,根据选择的设备信息和/或摄像头信息确定至少一个目标摄像头,可包括以下几种情况:
情况一、信息列表中仅包含第一设备及各个第二设备的设备信息,则可根据用户触发的选择操作,获取用户选择的设备信息,并根据该设备信息确定与设备信息对应的目标设备, 并将目标设备上的摄像头确定为目标摄像头。
可选地,可将各个目标设备上的所有摄像头均作为目标摄像头,例如,用户选择了第一设备,第一设备包括摄像头a及摄像头b,则可同时将摄像头a及摄像头b确定为目标摄像头。
可选地,也可针对每个目标设备均选择一个摄像头作为目标摄像头,例如,用户选择了第一设备及第二设备A,其中,第一设备包括摄像头a及摄像头b,第二设备A包括摄像头c和摄像头d,则可将第一设备的摄像头a及第二设备A的摄像头c确定为目标摄像头。进一步地,每个目标设备上所选择的目标摄像头可以是随机选择的,也可以是用户预先设置好的,或是可根据目标设备上的各个摄像头在过去一段时间内(如一星期内、一个月内等)被确定为目标摄像头的次数,并针对每个目标设备均次数最多的摄像头作为目标摄像头等,但不限于此。
情况二、信息列表仅包括第一设备及各个第二设备上设置的各个摄像头对应的摄像头信息,则可根据用户触发的选择操作,获取用户选择的摄像头信息,并将与该选择的摄像头信息对应的摄像头确定为目标摄像头。
情况三、信息列表可同时包括第一设备及各个第二设备分别对应的设备信息,和第一设备及各个第二设备上设置的各个摄像头对应的摄像头信息,则可根据用户触发的选择操作,获取用户选择的设备信息及摄像头信息,并将与选择的设备信息及摄像头信息对应的摄像头确定为目标摄像头。
图5为一个实施例中用户选择目标摄像头的示意图。如图5中的(a)所示,第一设备可在相机应用界面510中显示列表控件512,在用户需要选择目标摄像头时,可触发该列表控件512。如图5中的(b)所示,当第一设备检测到针对该列表控件512的触发操作时,可在相机应用界面510中展示信息列表514。信息列表514可包括第一设备及各个第二设备的设备信息,和第一设备及各个第二设备上的各个摄像头信息,如“本机前置”表示的是第一设备上的前置摄像头,“本机后置”表示的是第一设备上的后置摄像头,“手机A后置”表示的是手机A上的后置摄像头等。用户可根据实际需求在信息列表514中选择所需查看的目标摄像头,如图5中的(b)中选择第一设备上的前置摄像头及手机A上的后置摄像头。
在一些实施例中,第一设备获取选择的设备信息和/或摄像头信息后,可根据该选择的设备信息和/或摄像头信息判断是否存在冲突的摄像头,该存在冲突的摄像头可指的是摄像头无法同时进行图像采集,例如,在某些电子设备中前置摄像头与后置摄像头不支持同时进行图像采集等情况。若存在冲突的摄像头,则可根据冲突的摄像头对应的摄像头信息生成提示信息,该提示信息可用于提示存在冲突的摄像头,用户基于该提示信息可重新选择查看的目标摄像头。
在一些实施例中,若第一设备检测到通信连接的第二设备发生变化,例如与任一第二设备断开通信连接,或是与新的第二设备建立通信连接等,则可根据变化的第二设备实时更新信息列表,以保证信息列表的准确性。
步骤406,根据确定的目标摄像头的数量,确定第一界面布局。
步骤408,获取各个目标摄像头采集的图像数据。
步骤410,根据图像数据,按照第一界面布局在当前用户界面中显示至少部分目标摄像头分别对应的图像画面。
步骤406~410的描述可参考上述各实施例中的相关描述,在此不再重复赘述。
步骤412,响应于针对目标图像画面的查看操作,显示与目标图像画面对应的目标摄像头采集的图像数据,其中,目标图像画面为任一目标摄像头对应的图像画面。
在当前用户界面显示多个目标摄像头分别对应的图像画面的情况下,各个目标摄像头对应的图像画面可以是预览画面,用户可在当前用户界面中选择任一图像画面进行查看。在第一设备检测到针对目标图像画面的查看操作时,可响应该查看操作,并显示与目标图像画面对应的目标摄像头采集的图像数据,也即显示与目标摄像头对应的完整的图像画面,与目标摄像头采集的图像保持一致。
示例性地,图6为一个实施例中显示与目标图像画面对应的目标摄像头采集的图像数据的界面示意图。如图6中的(a)所示,用户界面610中显示有副机位1、副机位2、副机位3及副机位4分别对应的图像画面,用户进行针对副机位4对应的图像画面的查看操作(如点击操作等),如图6中的(b)所示,第一设备可响应该查看操作,并在用户界面610中切换显示副机位4的完整的图像画面。在用户需要重新查看副机位1、副机位2、副机位3及副机位4分别对应的图像画面时,则可进行返回操作,第一设备可根据返回操作返回至如图6中的(a)所示的用户界面610。
在本申请实施例中,用户可根据实际需求选择目标摄像头进行查看,第一设备可同时连接并动态地协调多个目标摄像头同时工作,且用户可随时查看任一目标摄像头采集的图像数据,交互方式更加简便、灵活,增强了交互性,提高用户体验。
在一个实施例中,步骤根据目标摄像头的数量,确定第一界面布局,可包括:若目标摄像头的数量大于第二数量阈值,则确定第一界面布局为可拖动布局;若目标摄像头的数量小 于或等于第二数量阈值,则确定第一界面布局为不可拖动布局。
其中,可拖动布局可指的是用户界面显示的目标摄像头对应的图像画面会随着用户进行的拖动操作发生变化的布局。若第一界面布局为可拖动布局,则可根据图像数据,按照第一界面布局在当前用户界面中显示第一部分的目标摄像头分别对应的图像画面。用户可在当前用户界面中进行拖动操作,第一设备可响应于针对当前用户界面的拖动操作,显示第二部分的目标摄像头分别对应的图像画面,该第二部分的目标摄像头区别于第一部分的目标摄像头。
在目标摄像头的数量大于第二数量阈值的情况下,第一设备的屏幕无法一次显示所有目标摄像头分别对应的图像画面,则可仅显示第一部分的目标摄像头分别对应的图像画面。进一步地,第一部分的目标摄像头的数量即为第二数量阈值。在用户需要查看其它目标设像头对应的图像画面时,可通过拖动操作改变当前用户界面中所显示的图像画面,以查看其它目标设像头对应的图像画面。需要说明的是,第二数量阈值可根据实际需求进行设置,如4、5、7、8等,在此不作限定。
示例性地,图7为一个实施例中按照可拖动布局显示目标摄像头对应的图像画面的界面示意图。如图7所示,目标摄像头可包括副机位1、副机位2、副机位3、副机位4及副机位5,第二数量阈值为4。如图7中的(a)所示,用户界面710可仅显示副机位1、副机位2、副机位3及副机位4分别对应的图像画面,在用户需要查看副机位5对应的图像画面时,可进行拖动操作(如单指划动操作)。如图7中的(b)所示,第一设备可响应于拖动操作,在用户界面710中显示副机位2、副机位3、副机位4及副机位5分别对应的图像画面。需要说明的是,在用户拖动用户界面的过程中,用户界面中可能会出现显示某个目标摄像头对应的图像画面的部分画面的情况,使得用户界面的显示更贴合用户的拖动操作,操作更加流畅。
不可拖动布局可指的是用户界面显示的目标摄像头对应的图像画面不会随着用户进行的拖动操作发生变化的布局。若第一界面布局为不可拖动布局,则根据图像数据,按照第一界面布局在当前用户界面中显示每一目标摄像头对应的图像画面。
在目标摄像头的数量小于或等于第二数量阈值的情况下,第一设备的屏幕可一次显示所有目标摄像头分别对应的图像画面,因此可直接在当前用户界面中显示每一目标摄像头对应的图像画面。示例性地,图8为一个实施例中按照不可拖动布局显示目标摄像头对应的图像画面的界面示意图。如图8所示,目标摄像头可包括副机位1、副机位2、副机位3、副机位4、主机位1及主机位2,第二数量阈值为6,则第一设备可在用户界面810中显示副机位1、副机位2、副机位3、副机位4、主机位1及主机位2分别对应的图像画面。
在本申请实施例中,可根据目标摄像头的数量灵活调整第一界面布局,并提供相应的交互方式,操作方式便捷,能够满足用户的不同需求,提高了用户界面的交互性。
下面将对确定第一界面布局,以及基于界面布局在当前用户界面中进行显示的几种方式进行介绍。在一些实施例中,如图9所示,确定第一界面布局,以及基于第一界面布局在当前用户界面中进行显示的一种方式,可包括以下步骤:
步骤902,根据目标摄像头的数量,确定各个目标摄像头对应的排布位置及对应的画面尺寸。
各个目标摄像头对应的排布位置可以是各个目标摄像头对应的图像画面的中心像素点在用户界面中的位置坐标,也可以是各个目标摄像头对应的图像画面的四个角像素点(或是左下角像素点及右上角像素点,或是左上角像素点及右下角像素点)在用户界面中的位置坐标等。
在一些实施例中,可按照以下几种规则中的一种或多种规则,确定各个目标摄像头对应的排布位置:
规则一:按照各个目标摄像头对应的目标设备与第一设备建立通信连接的时刻从先到后的顺序,依次确定各个目标摄像头对应的排布位置。可选地,属于第一设备的目标摄像头对应的图像画面,可排布在属于第二设备的目标摄像头对应的图像画面的前面,各个属于第二设备的目标摄像头对应的图像画面再按照与第一设备建立通信连接的时刻从先到后的顺序依次进行排布。
规则二、按照各个目标摄像头对应的优先级从高到低的顺序,依次确定各个目标摄像头对应的排布位置。可选地,各个目标摄像头对应的优先级可根据实际需求进行设置,如可以是由用户自行进行设置,也可以是根据各个目标摄像头所进行业务类型进行设置等。该目标摄像头所进行业务类型可包括但不限于自拍业务、普通拍照业务、录像业务、监控业务及身份识别业务等,但不限于此。例如,进行监控业务的目标摄像头的优先级可高于进行录像业务的目标摄像头的优先级,但不限于此。
规则三、按照各个目标摄像头对应的历史查看次数从多到少的顺序,依次确定各个目标摄像头对应的排布位置。在用户每次针对目标摄像头对应的图像画面进行查看操作时,第一设备对该目标摄像头对应的历史查看次数进行累加。可获取各个目标摄像头在过去预设时长(如3天、1天等)对应的历史查看次数,并将历史查看次数多的目标摄像头对应的图像画面排布在历史查看次数少的目标摄像头对应的图像画面的前面。
规则四、按照各个目标摄像头距离上一次也被确定为目标摄像头的时长从短到长的顺序,依次确定各个目标摄像头对应的排布位置。第一设备可记录每次确定的各个目标摄像头对应的摄像头信息及确定时间,可根据本次确定的各个目标摄像头对应的摄像头信息,获取本次确定的各个目标摄像头在上一次被确定为目标摄像头的确定时间,并计算本次确定的各个目标摄像头距离上一次也被确定为目标摄像头的时长。可将距离上一次被确定为目标摄像头的时长较短的本次确定的目标摄像头对应的图像画面,排布在距离上一次被确定为目标摄像头的时长较长的本次确定的目标摄像头对应的图像画面的前面。
例如,本次确定的目标摄像头包括摄像头001、摄像头003及摄像头006,其中,摄像头001上一次被确定为目标摄像头的确定时间为2小时前,摄像头003上一次被确定为目标摄像头的确定时间为1天前,摄像头006上一次被确定为目标摄像头的确定时间为6小时前,则摄像头001对应的图像画面可排布在摄像头006对应的图像画面的前面,摄像头006对应的图像画面可排布在摄像头003对应的图像画面的前面。
需要说明的是,确定各个目标摄像头对应的排布位置的规则并不仅限于上述的几种方式,也可以是其它的方式,例如,如随机对各个目标摄像头的图像画面进行排布等。
在一些实施例中,当目标摄像头的数量大于第一数量阈值时,根据目标摄像头的数量确定的画面尺寸可相同,例如,第一数量阈值可为4,在目标摄像头的数量为5、6、7等时,每个目标摄像头对应的画面尺寸均可为x*y,画面尺寸x*y可不随着目标摄像头的数量的变化而发生变化。示例性地,图10为又一个实施例中第一界面布局的示意图。如图10中的(a)及(b)所示,在目标摄像头的数量为5以及目标摄像头的数量为6时,用户界面1010中的每个目标摄像头对应的画面尺寸均相同,不再根据目标摄像头的数量进行自适应调整。按照该种第一界面布局,用户界面中能够显示更多的目标摄像头对应的图像画面,且可避免在目标摄像头的数量过多时图像画面的画面尺寸太小的问题,提高显示的灵活性及交互性。
在一些实施例中,当目标摄像头的数量小于或等于第一数量阈值时,每个目标摄像头对应的画面尺寸可根据目标摄像头的数量进行调整。可选地,在第一界面布局中每一目标摄像头对应的图像画面的画面尺寸相同,且每一目标摄像头对应的图像画面按照行和/或列依次排布的情况下,每个目标摄像头对应的画面尺寸的画面面积,可为当前用户界面的显示面积(小于或等于屏幕的显示面积)与目标摄像头的数量的比值。在目标摄像头的数量越少时,每个目标摄像头对应的画面尺寸可越大,在目标摄像头的数量越多时,每个目标摄像头对应的画面尺寸可越小。
示例性地,图11为还一个实施例中第一界面布局的示意图。如图11中的(a)及(b)所示,目标摄像头的数量为2时,各个目标摄像头对应的图像画面在用户界面1110中的画面尺寸,大于目标摄像头的数量为3时各个目标摄像头对应的图像画面在用户界面1110中的画面尺寸。每个目标摄像头对应的画面尺寸会根据目标摄像头的数量进行自适应调整。按照该种第一界面布局,用户界面中能够尽可能地显示更大画面尺寸的图像画面,提高了用户界面的显示灵活性及显示效果。
步骤904,从各个目标摄像头对应的图像数据中截取各个目标摄像头对应的图像画面。
在一些实施例中,第一设备可根据目标截取框从各个目标摄像头对应的图像数据中截取各个目标摄像头对应的图像画面,其中,目标截取框可与各个目标摄像头对应的画面尺寸成比例,以保证截取出的图像画面能够按照对应的画面尺寸正常进行显示。
可选地,若目标摄像头的数量大于第一数量阈值,则根据第一截取框从各个目标摄像头对应的图像数据中,截取各个目标摄像头对应的图像画面。由于在目标摄像头的数量大于第一数量阈值的情况下,根据目标摄像头的数量确定的画面尺寸可相同,画面尺寸不会随着目标摄像头的数量的变化进行自适应调整,因此,可采用统一的第一截取框截取图像画面。
示例性地,图12A为一个实施例中第一截取框的示意图。如图12A所示,在目标摄像头的数量大于第一数量阈值的情况下,可根据第一截取框1220从副机位1对应的图像数据(即完整的图像画面)中截取得到副机位1对应的图像画面,并按照副机位1对应的画面尺寸显示截取的图像画面,如按照图10中的图像尺寸,将副机位1对应的画面尺寸显示在相应的排布位置处。
可选地,若目标摄像头的数量小于或等于第一数量阈值,则分别根据与各个目标摄像头对应的画面尺寸匹配的第二截取框,从各个目标摄像头对应的图像数据中,截取各个目标摄像头对应的图像画面。由于在目标摄像头的数量小于或等于第一数量阈值的情况下,可根据不同的目标摄像头的数量确定不同的画面尺寸,因此,可根据与不同的画面尺寸匹配的第二截取框,截取图像画面。
示例性地,图12B为一个实施例中第二截取框的示意图,如图12C为另一个实施例中第二截取框的示意图。如图12B及图12C所示,在目标摄像头的数量小于或等于第一数量阈值的情况下,图12B所对应的目标摄像头的数量(如3个)可小于图12C所对应的目标摄像头的数量(如4个),则图12B中的第二截取框1230的尺寸大于第12C中的第二截取框1240的尺寸。第二截取框的大小可根据画面尺寸进行适应性调整,可保证截取的图像画面在显示 时的准确性。
在一些实施例中,若第一摄像头对应的图像数据的图像尺寸小于目标截取框的尺寸,则按照第一比例对目标截取框的尺寸进行调整,并根据调整后的目标截取框从第一摄像头对应的图像数据截取第一摄像头对应的图像画面,其中,第一摄像头为任一目标摄像头。
在第一摄像头对应的图像数据的图像尺寸小于目标截取框的尺寸的情况下,即说明第一摄像头采集的完整的图像画面的图像尺寸小于目标截取框的尺寸,若是直接按照目标截取框的尺寸进行截取,则会截取到带黑边的图像画面,影响图像画面的效示效果。因此,可按照第一比例对目标截取框的尺寸进行调整,进一步地,可按照第一比例对目标截取框的尺寸进行缩小,以使得调整后的目标截取框的尺寸小于或等于第一摄像头对应的图像数据的图像尺寸。
图13为一个实施例中对目标截取框进行自适应的示意图。如图13中的(a)所示,未调整前的目标截取框1320的尺寸大于副机位3的图像数据1310的图像尺寸,若直接按照未调整前的目标截取框1320截取图像画面,会导致截取的图像画面中包含不属于副机位3的图像数据1310中的图像内容。如图13中的(b)所示,可按照第一比例对目标截取框1320进行缩小,缩小后的目标截取框1330的尺寸小于副机位3的图像数据1310的图像尺寸,则可按照缩小后的目标截取框1330对副机位3的图像数据1310进行截取,得到副机会3对应的图像画面。在本申请实施例中,可根据目标截取框与目标摄像头对应的图像数据的图像尺寸之间的大小关系,对目标截取框进行自适应调整,可提高截取的图像画面的准确性,提高图像画面的显示效果。
在一些实施例中,目标截取框在目标摄像头对应的图像数据中所截取的图像画面,可处于图像数据的固定位置,例如,目标截取框所截取的图像画面可以是图像数据的中间图像区域等,但不限于此。在另一些实施例中,用户也可根据实施需求移动目标截取框,以调整在目标摄像头对应的图像数据所截取的图像画面的图像位置。第一设备可根据移动后的目标截取框在目标摄像头对应的图像数据的图像位置,截取该目标摄像头对应的图像画面。可满足用户对于显示不同图像位置的图像画面的需求,提高用户粘度。
步骤908,按照各个目标摄像头对应的排布位置及对应的画面尺寸,在当前用户界面中显示至少部分目标摄像头分别对应的图像画面。
在一些实施例中,若目标截取框的尺寸大于目标摄像头对应的画面尺寸(即截取的图像画面大于目标摄像头对应的画面尺寸),则可按照第一截取框的尺寸与该画面尺寸之间的比例,对截取的图像画面进行压缩,以得到与该画面尺寸匹配的图像画面,并按照各个目标摄像头对应的排布位置在当前用户界面中进行显示。
在本申请实施例中,可根据目标摄像头的数量动态调整图像画面的画面尺寸及排布位置,可提高在用户界面中显示多个目标摄像头分别对应的图像画面的灵活性,且保证了图像画面显示的准确性。
在一些实施例中,如图14所示,确定第一界面布局,以及基于第一界面布局在当前用户界面中进行显示的另一种方式,可包括以下步骤:
步骤1402,获取各个目标摄像头对应的设备类型,该设备类型包括横屏设备或竖屏设备。
设备类型为横屏设备的目标摄像头所采集的图像数据为横屏图像,该横屏图像可指的是长大于高的图像,设备类型为竖屏设备的目标摄像头所采集的图像数据为竖屏图像,该竖屏图像可指的是长小于高的图像。图15为一个实施例中横屏图像与竖屏图像的示意图。如图15所示,横屏图像的长大于高,竖屏图像的长小于高。
第一设备可判断各个目标摄像头所采集的图像数据为横屏图像还是竖屏图像,以确定各个目标摄像头对应的设备类型。
步骤1404,确定设备类型为横屏设备的目标摄像头,与设备类型为竖屏设备的目标摄像头之间的横竖屏比例。
横竖屏比例可以是设备类型为横屏设备的目标摄像头的数量,除以设备类型为竖屏设备的目标摄像头的数量,得到的值。例如,目标摄像头中包括3个设备类型为横屏设备的目标摄像头,以及4个设备类型为竖屏设备的目标摄像头,则横竖屏比例可为3/4。
步骤1406,根据目标摄像头的数量及横竖屏比例,确定第一界面布局。
第一界面布局可包括画面形状,该画面形状可用于定义图像画面显示时为横版画面还是竖版画面,其中,横版画面的长大于高,竖版画面的长小于高。示例性地,图16A为一个实施例中画面形状为横版画面的第一界面布局的示意图。如图16A所示,用户界面1610中的每一目标摄像头对应的图像画面按照横版画面进行排布,每一目标摄像头对应的图像画面的长大于高。示例性地,图16B为一个实施例中画面形状为竖版画面的第一界面布局的示意图。如图16B所示,用户界面1620中的每一目标摄像头对应的图像画面按照竖版画面进行排布,每一目标摄像头对应的图像画面的长小于高。
在一些实施例中,若横竖屏比例大于第一比例阈值,则可确定画面形状为横版画面,若横竖屏比例小于第二比例阈值,则可确定画面形状为竖版画面,其中,第一比例阈值大于第 二比例阈值。在横竖屏比例大于第一比例阈值的情况下,说明大部分目标摄像头的设备类型为横屏设备,则可在用户界面中显示画面形状为横版画面的图像画面。在横竖屏比例小于第二比例阈值的情况下,说明大部分目标摄像头的设备类型为竖屏设备,则可在像界面中显示画面形状为竖版画面的图像画面。
在其它的实施例中,也可根据设备类型为竖屏设备的目标摄像头,与设备类型为横屏设备的目标摄像头之间的竖横屏比例,确定画面形状。在竖横屏比例大于第三比例阈值时,确定画面形状为竖版画面,在竖横屏比例小于第四比例阈值时,确定画面形状为横版画面,其中,第三比例阈值大于第四比例阈值。
可选地,也可根据设备类型为竖屏设备的目标摄像头的数量,占所有目标摄像头的数量的比例,和/或根据设备类型为横屏设备的目标摄像头的数量,占所有目标摄像头的数量的比例,确定画面形状。在设备类型为竖屏设备的目标摄像头的数量,占所有目标摄像头的数量的比例大于预设阈值(如80%、75%等)时,则确定画面形状为竖版画面;在设备类型为横屏设备的目标摄像头的数量,占所有目标摄像头的数量的比例大于预设阈值时,则确定画面形状为横版画面。
在一些实施例中,当横竖屏比例小于或等于第一比例阈值,且大于或等于第二比例阈值时,则可确定画面形状为默认形状,该默认形状可以是由产品研发人员统一设置的画面形状,也可以是用户自行选择的画面形状,在此不作限定。
在一些实施例中,不论确定的画面形状为横版画面还是竖版画面,在目标摄像头的数量大于第二数量阈值时,第一界面布局可以为可拖动布局,在目标摄像头的数量小于或等于第二数量阈值时,第一界面布局可以是不可拖动布局。
步骤1408,根据第一界面布局包含的画面形状及各个目标摄像头对应的设备类型,从各个目标摄像头对应的图像数据中确定与画面形状匹配的图像画面,并按照各个目标摄像头对应的排布位置及对应的画面尺寸显示至少部分目标摄像头分别对应的图像画面。
在一些实施例中,若目标摄像头对应的设备类型与确定的画面形状匹配,则可采用压缩的方式,根据该目标摄像头对应的图像数据获取图像画面。若目标摄像头对应的设备类型与确定的画面形状不匹配,则可采用截取的方式,根据该目标摄像头对应的图像数据获取图像画面。
以目标摄像头中的第二摄像头及第三摄像头为例,第二摄像头及第三摄像头均可为任一目标摄像头,作为一种具体实施方式,若画面形状为竖版画面,且第二摄像头对应的设备类型为竖屏设备(即设备类型与画面形状匹配),则可根据第二摄像头对应的画面尺寸,对第二摄像头对应的图像数据进行压缩,得到第二摄像头对应的图像画面,并在第二摄像头对应的排布位置显示第二摄像头对应的图像画面。
若画面形状为竖版画面,且第三摄像头对应的设备类型为横屏设备,则根据目标竖版截取框从第三摄像头对应的图像数据中截取第三摄像头对应的图像画面,并根据第三摄像头对应的排布位置及画面尺寸显示第三摄像头对应的图像画面。其中,目标竖版截取框的长小于高。
若横版形状为横版画面,且第三摄像头对应的设备类型为横屏设备,则根据第三摄像头对应的画面尺寸,对第三摄像头对应的图像数据进行压缩,得到第三摄像头对应的图像画面,并在第三摄像头对应的排布位置显示第三摄像头对应的图像画面。
若横版形状为横版画面,且第二摄像头对应的设备类型为竖屏设备,则根据目标横版截取框从第二摄像头对应的图像数据中截取第二摄像头对应的图像画面,并根据第二摄像头对应的排布位置及画面尺寸显示第二摄像头对应的图像画面。其中,目标横版截取框的长小于高。
相较于全部采用截取的方式获取图像画面,根据不同的画面形状及设备类型灵活调整获取图像画面的方式,可使得显示的图像画面包含更多的图像内容,且可保证图像画面与画面形状适配,提高用户界面的显示效果。
需要说明的是,具体如何通过目标竖版截取框或目标横版截取框截取图像画面的方式,可与上述实施例中描述的根据目标截取框从目标摄像头对应的图像数据中截取目标摄像头对应的图像画面的方式相类似,在此不再赘述。
在本申请实施例中,可根据各个目标摄像头的设备类型,选择与更多目标摄像头采集的图像数据所适配的画面形状,进行画面形状的自适应调整,且针对不同的画面形状及设备类型,可采用更为合适的方式获取图像画面,可使得在用户界面中显示的图像画面能够包含更多的图像内容,显示效果更好。
如图17所示,在另一个实施例中,提供一种图像显示方法,可应用于上述的第一设备,该方法可包括以下步骤:
步骤1702,展示信息列表,该信息列表包括第一设备及各个第二设备分别对应的设备信息,和/或第一设备及各个第二设备上设置的各个摄像头对应的摄像头信息。
步骤1704,响应于针对信息列表的选择操作,根据选择的设备信息和/或摄像头信息确 定至少一个目标摄像头。
步骤1706,根据确定的目标摄像头的数量,确定第一界面布局。
步骤1708,获取各个目标摄像头采集的图像数据。
步骤1710,根据图像数据,按照第一界面布局在当前用户界面中显示至少部分目标摄像头分别对应的图像画面。
步骤1702~1710的描述可参考上述各实施例中的相关描述,在此不再重复赘述。
步骤1712,在检测到目标摄像头的数量发生变化时,根据变化后的数量确定第二界面布局。
当检测到目标摄像头的数量发生变化时,如检测目标摄像头的数量减少或目标摄像头的数量增加时,可根据变化后的数量确定第二界面布局,其中,该第二界面布局可区别于上述的第一界面布局,实现实时根据目标摄像头的数量动态调整用户界面的界面布局的方案。
在一些实施例中,检测到目标摄像头的数量发生变化,可包括以下几种情况中的任一种情况:
情况一、目标摄像头的数量从第一数量减少至第二数量,且第一数量大于第三数量阈值,第二数量小于或等于第三数量阈值,例如,第三数量阈值为4,第一数量为5,第二数量为4,目标摄像头的数量从5减少到4。若目标摄像头的数量从第一数量减少至第二数量,且第一数量大于第三数量阈值,第二数量小于或等于第三数量阈值,可根据第二数量重新确定变化后的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局。
在目标摄像头的数量小于或等于第三数量阈值时,每个目标摄像头对应的画面尺寸可根据目标摄像头的数量进行自适应调整。因此,在该情况下,可根据第二数量重新确定变化后的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局。在第二界面布局中,第二数量的目标摄像头分别对应的排布位置及对应的画面尺寸,均与该第二数量的目标摄像头在第一界面布局中对应的排布位置及对应的画面尺寸不同。
示例性地,图18为一个实施例中根据变化的目标摄像头的数量,动态调整用户界面的界面布局的示意图。如图18所示,其中,(a)为目标摄像头的数量为5时,用户界面1810的第一界面布局的示意图,(b)为目标摄像头的数量变为4时,用户界面1810的第二界面布局的示意图。目标摄像头从5个减少为4个(减少了主机位1),则第二界面布局中副机位1、副机位2、副机位3及副机位4分别对应的排布位置及对应的画面尺寸,均与第一界面布局中副机位1、副机位2、副机位3及副机位4分别对应的排布位置及对应的画面尺寸不同。
情况二、目标摄像头的数量从第一数量减少至第二数量,且第一数量及第二数量均小于或等于第三数量阈值,例如,第三数量阈值为4,第一数量为4,第二数量为3,目标摄像头的数量从4减少到3。若目标摄像头的数量从第一数量减少至第二数量,且第一数量及第二数量均小于或等于第三数量阈值,可根据第二数量重新确定变化后的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局。在目标摄像头的数量小于或等于第三数量阈值时,每个目标摄像头对应的画面尺寸可根据目标摄像头的数量进行自适应调整。因此,在该情况下,在第二界面布局中,第二数量的目标摄像头分别对应的排布位置及对应的画面尺寸,均与该第二数量的目标摄像头在第一界面布局中对应的排布位置及对应的画面尺寸不同。
示例性地,图19为另一个实施例中根据变化的目标摄像头的数量,动态调整用户界面的界面布局的示意图。如图19所示,其中,(a)为目标摄像头的数量为4时,用户界面1910的第一界面布局的示意图,(b)为目标摄像头的数量变为3时,用户界面1910的第二界面布局的示意图。目标摄像头从4个减少为3个(减少了副机位4),则第二界面布局中副机位1、副机位2、副机位3分别对应的排布位置及对应的画面尺寸,均与第一界面布局中副机位1、副机位2、副机位3分别对应的排布位置及对应的画面尺寸不同。
情况三、目标摄像头的数量从第一数量减少至第二数量,且第一数量及第二数量均大于第三数量阈值,例如,第三数量阈值为4,第一数量为6,第二数量为5,目标摄像头的数量从6减少到5。若目标摄像头的数量从第一数量减少至第二数量,且第一数量及第二数量均大于第三数量阈值,则删除减少的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局。
在目标摄像头的数量大于第三数量阈值时,根据目标摄像头的数量确定的画面尺寸可相同,也即,画面尺寸不根据目标摄像头的数量进行自适应调整。因此,可直接删除少的各个目标摄像头对应的排布位置及对应的画面尺寸,第二界面布局中第二数量的目标摄像头分别对应的排布位置及对应的画面尺寸,可与该第二数量的目标摄像头在第一界面布局中对应的排布位置及对应的画面尺寸相同。
示例性地,图20为又一个实施例中根据变化的目标摄像头的数量,动态调整用户界面的界面布局的示意图。如图20所示,其中,(a)为目标摄像头的数量为6时,用户界面2010的第一界面布局的示意图,(b)为目标摄像头的数量变为5时,用户界面2010的第二界面布局的示意图。目标摄像头从6个减少为5个(减少了副机位5),则可只删除副机位5对应的 排布位置及对应的画面尺寸,第二界面布局中副机位1、副机位2、副机位3及副机位4分别对应的排布位置及对应的画面尺寸,均与第一界面布局中副机位1、副机位2、副机位3及副机位4分别对应的排布位置及对应的画面尺寸相同。
情况四、目标摄像头的数量从第一数量增加至第三数量,且第一数量小于或等于第三数量阈值,例如,第三数量阈值为4,第一数量为2,第二数量为3等。若目标摄像头的数量从第一数量增加至第三数量,且第一数量小于或等于第三数量阈值,则根据第三数量重新确定变化后的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局。
以图19为例,若目标摄像头的数量从3个增加至4个,则用户界面1910的界面布局从(b)变为(a)。
情况五、目标摄像头的数量从第一数量增加至第三数量,且第一数量小于或等于第三数量阈值,第三数量大于第三数量阈值,例如,第三数量阈值为4,第一数量为3,第二数量为5等。若目标摄像头的数量从第一数量增加至第三数量,且第一数量小于或等于第三数量阈值,第三数量大于第三数量阈值,则根据第三数量重新确定变化后的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局。
以图18为例,若目标摄像头的数量从4个增加至5个,则用户界面1810的界面布局从(b)变为(a)。
情况六、目标摄像头的数量从第一数量增加至第三数量,且第一数量及第三数量均大于第三数量阈值,例如,第三数量阈值为4,第一数量为5,第二数量为6等。若目标摄像头的数量从第一数量增加至第三数量,且第一数量及第三数量均大于第三数量阈值,则确定增加的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局。
以图20为例,若目标摄像头的数量从5个增加至6个,则用户界面2010的界面布局从(b)变为(a)。
在一些实施例中,若目标摄像头的数量从第一数量增加至第三数量,且第一数量小于或等于第二数量阈值,第三数量大于第二数量阈值,则可将不可拖动布局的第一界面布局切换为可拖动布局的第二界面布局;若目标摄像头的数量从第一数量减少至第二数量,且第一数量大于第二数量阈值,第二数量小于或等于第二数量阈值,则可将可拖动布局的第一界面布局切换为不可拖动布局的第二界面布局。
需要说明的是,根据第二数量重新确定变化后的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局的具体实施方式,可与上述各实施例中提供的根据目标摄像头的数量确定第一界面布局的方式类似,在此不再重复赘述。
步骤1714,根据变化后的各个目标摄像头采集的图像数据,按照第二界面布局,在当前用户界面中显示变化后的各个目标摄像头对应的图像画面。
在本申请实施例中,可根据变化的目标摄像头的数量,动态调整用户界面的界面布局,可在多种不同的界面布局及交互方式中进行顺滑切换,提高用户界面的显示效果及交互性。
在一些实施例中,本申请还可提供同步拍摄的功能。上述方法还可包括:响应于拍摄操作,向各个目标摄像头对应的目标设备发送拍摄指令,该拍摄指令用于指示目标设备控制自身的目标摄像头进行图像拍摄,得到目标图像;接收各个目标设备发送的目标图像,并按照第一界面布局对目标图像进行拼接,得到拼接图像。
在用户需要控制多个目标摄像头同时进行拍摄时,可在当前用户界面中触发拍摄操作(如可以点击当前用户界面中提供的拍摄控件等)。在第一设备检测到拍摄操作时,可向各个目标摄像头对应的目标设备发送拍摄指令。若目标设备为第一设备,则第一设备可根据拍摄操作生成拍摄指令,并控制第一设备上的目标摄像头进行图像拍摄,得到目标图像。若目标设备为第二设备,则第一设备可向该第二设备发送拍摄指令,该第二设备可根据接收的拍摄指令控制该第二设备上的目标摄像头进行图像拍摄,得到目标图像,并将目标图像返回给第一设备。
在一些实施例中,发送到目标设备的拍摄指令,可携带有设置在该目标设备上的目标摄像头对应的画面尺寸。拍摄指令用于指示目标设备控制自身的目标摄像头进行拍摄,得到待处理图像,并按照拍摄指令携带的画面尺寸对待处理图像进行截取,得到目标图像。目标设备在通过自身的目标摄像头进行拍摄,得到待处理图像后,可根据拍摄指令携带的画面尺寸对待处理图像进行截取,得到目标图像。
第一设备在获取各个目标设备得到的目标图像后,可按照第一界面布局对各个目标图像进行拼接,得到拼接图像。在一些实施例中,第一设备可将拼接图像分别同步给各个目标设备,进一步地,若目标设备为第二设备,则第一设备可将拼接图像发送给该第二设备。
在一些实施例中,在各个目标设备通过自身的目标摄像头拍摄得到待处理图像后,也可直接将待处理图像同步给其它目标设备,使得所有参与拍摄的电子设备均可共享无损的拍摄图像。
在本申请实施例中,多个目标摄像头可同步完成图像拍摄,形成拍摄阵列,且第一设备可按照第一界面布局对拍摄的图像进行拼接,实现多个目标摄像头拍摄的图像的自动排版剪 辑功能,且可将拼接图像同步至所有参与拍摄的电子设备中,保证了数据同步,减化用户操作,同步方式更为便捷。
如图21所示,在一个实施例中,提供一种图像显示装置2100,可应用于上述的第一设备,该第一设备与至少一个第二设备建立通信连接。图像显示装置2100可包括摄像头确定模块2110、布局确定模块2120、数据获取模块2130及显示模块2140。
摄像头确定模块2110,被配置为从第一设备及至少一个第二设备上设置的各个摄像头中,确定至少一个目标摄像头。
布局确定模块2120,被配置为根据确定的目标摄像头的数量,确定第一界面布局。
数据获取模块2130,被配置为获取各个目标摄像头采集的图像数据。
显示模块2140,被配置为根据图像数据,按照第一界面布局在当前用户界面中显示至少部分目标摄像头分别对应的图像画面。
在一个实施例中,在第一界面布局中,每一目标摄像头对应的图像画面的画面尺寸相同,且每一目标摄像头对应的图像画面按照行和/或列依次排布。
在一个实施例中,摄像头确定模块2110,还被配置为展示信息列表,信息列表包括第一设备及各个第二设备分别对应的设备信息,和/或第一设备及各个第二设备上设置的各个摄像头对应的摄像头信息;以及响应于针对信息列表的选择操作,根据选择的设备信息和/或摄像头信息确定至少一个目标摄像头。
在一个实施例中,第一界面布局包括各个目标摄像头对应的排布位置及对应的画面尺寸。显示模块2140,包括画面获取单元及显示单元。
画面获取单元,被配置为从各个目标摄像头对应的图像数据中截取各个目标摄像头对应的图像画面。
在一个实施例中,画面获取单元,还被配置为若目标摄像头的数量大于第一数量阈值,则根据第一截取框从各个目标摄像头对应的图像数据中,截取各个目标摄像头对应的图像画面。
在一个实施例中,画面获取单元,还被配置为若目标摄像头的数量小于或等于第一数量阈值,则分别根据与各个目标摄像头对应的画面尺寸匹配的第二截取框,从各个目标摄像头对应的图像数据中,截取各个目标摄像头对应的图像画面。
在一个实施例中,画面获取单元,还被配置为若第一摄像头对应的图像数据的图像尺寸小于目标截取框的尺寸,则按照第一比例对目标截取框的尺寸进行调整,并根据调整后的目标截取框从第一摄像头对应的图像数据截取第一摄像头对应的图像画面,其中,第一摄像头为任一目标摄像头。
显示单元,被配置为按照各个目标摄像头对应的排布位置及对应的画面尺寸,在当前用户界面中显示至少部分目标摄像头分别对应的图像画面。
在一个实施例中,布局确定模块2120,还被配置为获取各个目标摄像头对应的设备类型,设备类型包括横屏设备或竖屏设备;确定设备类型为横屏设备的目标摄像头,与设备类型为竖屏设备的目标摄像头之间的横竖屏比例;根据目标摄像头的数量及横竖屏比例,确定第一界面布局。
在一个实施例中,第一界面布局包括画面形状、各个目标摄像头对应的排布位置及对应的画面尺寸。布局确定模块2120,还被配置为若横竖屏比例大于第一比例阈值,则确定画面形状为横版画面;若横竖屏比例小于第二比例阈值,则确定画面形状为竖版画面;其中,第一比例阈值大于第二比例阈值,横版画面的长大于高,竖版画面的长小于高;以及根据目标摄像头的数量,确定各个目标摄像头对应的排布位置及对应的画面尺寸。
在一个实施例中,画面获取单元,还被配置为若画面形状为竖版画面,且第二摄像头对应的设备类型为竖屏设备,则根据第二摄像头对应的画面尺寸,对第二摄像头对应的图像数据进行压缩,得到第二摄像头对应的图像画面;显示单元,还被配置为在第二摄像头对应的排布位置显示第二摄像头对应的图像画面。
画面获取单元,还被配置为若画面形状为竖版画面,且第三摄像头对应的设备类型为横屏设备,则根据目标竖版截取框第三摄像头对应的图像数据中截取第三摄像头对应的图像画面;显示单元,还被配置为根据第三摄像头对应的排布位置及画面尺寸显示第三摄像头对应的图像画面;其中,第二摄像头及第三摄像头均为任一目标摄像头,目标竖版截取框的长小于高。
在一个实施例中,画面获取单元,还被配置为若横版形状为横版画面,且第三摄像头对应的设备类型为横屏设备,则根据第三摄像头对应的画面尺寸,对第三摄像头对应的图像数据进行压缩,得到第三摄像头对应的图像画面;显示单元,还被配置为在第三摄像头对应的排布位置显示第三摄像头对应的图像画面。
画面获取单元,还被配置为若横版形状为横版画面,且第二摄像头对应的设备类型为竖屏设备,则根据目标横版截取框从第二摄像头对应的图像数据中截取第二摄像头对应的图像画面;显示单元,还被配置为根据第二摄像头对应的排布位置及画面尺寸显示第二摄像头对 应的图像画面;其中,第二摄像头及第三摄像头均为任一目标摄像头,目标竖版截取框的长小于高,目标横版截取框的长小于高。
在一个实施例中,布局确定模块2120,还被配置为若目标摄像头的数量大于第二数量阈值,则确定第一界面布局为可拖动布局;若目标摄像头的数量小于或等于第二数量阈值,则确定第一界面布局为不可拖动布局。
显示模块2140,还被配置为若第一界面布局为可拖动布局,则根据图像数据,按照第一界面布局在当前用户界面中显示第一部分的目标摄像头分别对应的图像画面;若第一界面布局为不可拖动布局,则根据图像数据,按照第一界面布局在当前用户界面中显示每一目标摄像头对应的图像画面。
在一个实施例中,显示模块2140,还被配置为响应于针对当前用户界面的拖动操作,显示第二部分的目标摄像头分别对应的图像画面,第二部分的目标摄像头区别于第一部分的目标摄像头。
在一个实施例中,布局确定模块2120,还被配置为在检测到目标摄像头的数量发生变化时,根据变化后的数量确定第二界面布局。
在一个实施例中,布局确定模块2120,还被配置为若目标摄像头的数量从第一数量减少至第二数量,且第一数量大于第三数量阈值,第二数量小于或等于第三数量阈值,或第一数量及第二数量均小于或等于第三数量阈值,则根据第二数量重新确定变化后的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局;以及若目标摄像头的数量从第一数量减少至第二数量,且第一数量及第二数量均大于第三数量阈值,则删除减少的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局。
在一个实施例中,布局确定模块2120,还被配置为若目标摄像头的数量从第一数量增加至第三数量,且第一数量小于或等于第三数量阈值,第三数量大于第三数量阈值,或第一数量及第三数量均小于或等于第三数量阈值,则根据第三数量重新确定变化后的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局;以及若目标摄像头的数量从第一数量增加至第三数量,且第一数量及第三数量均大于第三数量阈值,则确定增加的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局。
显示模块2140,还被配置为根据变化后的各个目标摄像头采集的图像数据,按照第二界面布局,在当前用户界面中显示变化后的各个目标摄像头对应的图像画面。
在一个实施例中,显示模块2140,还被配置为响应于针对目标图像画面的查看操作,显示与目标图像画面对应的目标摄像头采集的图像数据,其中,目标图像画面为任一目标摄像头对应的图像画面。
在一个实施例中,上述的图像显示装置2100,还包括拍摄模块及拼接模块。
拍摄模块,被配置为响应于拍摄操作,向各个目标摄像头对应的目标设备发送拍摄指令,拍摄指令被配置为指示目标设备控制自身的目标摄像头进行图像拍摄,得到目标图像。
在一个实施例中,第一界面布局包括各个目标摄像头对应的画面尺寸;拍摄指令携带有设置在目标设备上的目标摄像头对应的画面尺寸;拍摄指令被配置为指示目标设备控制自身的目标摄像头进行拍摄,得到待处理图像,并按照拍摄指令携带的画面尺寸对待处理图像进行截取,得到目标图像。
拼接模块,还被配置为获取各个目标设备得到的目标图像,并按照第一界面布局对目标图像进行拼接,得到拼接图像。
在一个实施例中,拼接模块,还被配置为将拼接图像分别同步到各个目标设备。
在本申请实施例中,第一设备可根据目标摄像头的数量确定第一界面布局,并按照该第一界面布局在当前用户界面中显示至少部分目标摄像头分别对应的图像画面,在当前用户界面中可同时显示多个目标摄像头分别对应的图像画面,用户不需要频繁对需要查看的摄像头进行切换,可简化用户操作,且可根据目标摄像头的数量灵活调整第一界面布局,使当前用户界面的界面布局与目标摄像头的数量适配,能够更加灵活地显示各个目标摄像头的图像画面。相较于相关技术中用户提前设置界面布局的方式,显示方式更加灵活,且可减少用户选择设置的操作,贴合用户需求,提高了用户粘度,且可提高交互性。
图22为一个实施例中电子设备的结构框图。如图22所示,电子设备2200可以包括一个或多个如下部件:处理器2210、与处理器2210耦合的存储器2220,其中存储器2220可存储有一个或多个计算机程序,一个或多个计算机程序可以被配置为由一个或多个处理器2210执行时实现如上述各实施例描述的方法。
处理器2210可以包括一个或者多个处理核。处理器2210利用各种接口和线路连接整个电子设备2200内的各个部分,通过运行或执行存储在存储器2220内的指令、程序、代码集或指令集,以及调用存储在存储器2220内的数据,执行电子设备2200的各种功能和处理数据。可选地,处理器2210可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器2210可集成中央处理器(Central Processing  Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器2210中,单独通过一块通信芯片进行实现。
存储器2220可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。存储器2220可用于存储指令、程序、代码、代码集或指令集。存储器2220可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等。存储数据区还可以存储电子设备2200在使用中所创建的数据等。
可以理解地,电子设备2200可包括比上述结构框图中更多或更少的结构元件,例如,包括电源模块、物理按键、WiFi(Wireless Fidelity,无线保真)模块、扬声器、蓝牙模块、传感器等,还可在此不进行限定。
本申请实施例公开一种计算机可读存储介质,其存储计算机程序,其中,该计算机程序被处理器执行时实现如上述实施例描述的方法。
本申请实施例公开一种计算机程序产品,该计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,且该计算机程序可被处理器执行时实现如上述各实施例描述的方法。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、ROM等。
如此处所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括ROM、可编程ROM(Programmable ROM,PROM)、可擦除PROM(Erasable PROM,EPROM)、电可擦除PROM(Electrically Erasable PROM,EEPROM)或闪存。易失性存储器可包括随机存取存储器(random access memory,RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM可为多种形式,诸如静态RAM(Static RAM,SRAM)、动态RAM(Dynamic Random Access Memory,DRAM)、同步DRAM(synchronous DRAM,SDRAM)、双倍数据率SDRAM(Double Data Rate SDRAM,DDR SDRAM)、增强型SDRAM(Enhanced Synchronous DRAM,ESDRAM)、同步链路DRAM(Synchlink DRAM,SLDRAM)、存储器总线直接RAM(Rambus DRAM,RDRAM)及直接存储器总线动态RAM(Direct Rambus DRAM,DRDRAM)。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定特征、结构或特性可以以任意适合的方式结合在一个或多个实施例中。本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在本申请的各种实施例中,应理解,上述各过程的序号的大小并不意味着执行顺序的必然先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可位于一个地方,或者也可以分布到多个网络单元上。可根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。
另外,在本申请各实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上对本申请实施例公开的一种图像显示方法、装置、电子设备及计算机可读存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想。同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (23)

  1. 一种图像显示方法,其中,应用于第一设备,所述第一设备与至少一个第二设备建立通信连接;所述方法包括:
    从所述第一设备及所述至少一个第二设备上设置的各个摄像头中,确定至少一个目标摄像头;
    根据确定的所述目标摄像头的数量,确定第一界面布局;
    获取各个所述目标摄像头采集的图像数据;
    根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面。
  2. 根据权利要求1所述的方法,其中,所述从所述第一设备及所述至少一个第二设备上设置的各个摄像头中,确定至少一个目标摄像头,包括:
    展示信息列表,所述信息列表包括所述第一设备及各个所述第二设备分别对应的设备信息,和/或所述第一设备及各个所述第二设备上设置的各个摄像头对应的摄像头信息;
    响应于针对所述信息列表的选择操作,根据选择的设备信息和/或摄像头信息确定至少一个目标摄像头。
  3. 根据权利要求1所述的方法,其中,在所述第一界面布局中,每一所述目标摄像头对应的图像画面的画面尺寸相同,且每一所述目标摄像头对应的图像画面按行和/或列依次进行排布。
  4. 根据权利要求1所述的方法,其中,所述第一界面布局包括各个所述目标摄像头对应的排布位置及对应的画面尺寸;所述根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面,包括:
    从各个所述目标摄像头对应的图像数据中截取各个所述目标摄像头对应的图像画面;
    按照所述各个所述目标摄像头对应的排布位置及对应的画面尺寸,在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面。
  5. 根据权利要求4所述的方法,其中,所述从各个所述目标摄像头对应的图像数据中截取各个所述目标摄像头对应的图像画面,包括:
    若所述目标摄像头的数量大于第一数量阈值,则根据第一截取框从各个所述目标摄像头对应的图像数据中,截取各个所述目标摄像头对应的图像画面。
  6. 根据权利要求4所述的方法,其中,所述从各个所述目标摄像头对应的图像数据中截取各个所述目标摄像头对应的图像画面,包括:
    若所述目标摄像头的数量小于或等于第一数量阈值,则分别根据与各个所述目标摄像头对应的画面尺寸匹配的第二截取框,从各个所述目标摄像头对应的图像数据中,截取各个所述目标摄像头对应的图像画面。
  7. 根据权利要求4~6任一所述的方法,其中,所述从各个所述目标摄像头对应的图像数据中截取各个所述目标摄像头对应的图像画面,包括:
    若第一摄像头对应的图像数据的图像尺寸小于目标截取框的尺寸,则按照第一比例对所述目标截取框的尺寸进行调整,并根据调整后的目标截取框从所述第一摄像头对应的图像数据截取所述第一摄像头对应的图像画面,其中,所述第一摄像头为任一所述目标摄像头。
  8. 根据权利要求1所述的方法,其中,所述根据目标摄像头的数量,确定第一界面布局,包括:
    获取各个目标摄像头对应的设备类型,所述设备类型包括横屏设备或竖屏设备;
    确定设备类型为所述横屏设备的目标摄像头,与设备类型为所述竖屏设备的目标摄像头之间的横竖屏比例;
    根据所述目标摄像头的数量及所述横竖屏比例,确定第一界面布局。
  9. 根据权利要求8所述的方法,其中,所述第一界面布局包括画面形状、各个所述目标摄像头对应的排布位置及对应的画面尺寸;所述根据所述目标摄像头的数量及所述横竖屏比例,确定第一界面布局,包括:
    若所述横竖屏比例大于第一比例阈值,则确定所述画面形状为横版画面;
    若所述横竖屏比例小于第二比例阈值,则确定所述画面形状为竖版画面;其中,所述第一比例阈值大于所述第二比例阈值,所述横版画面的长大于高,所述竖版画面的长小于高;
    根据所述目标摄像头的数量,确定所述各个所述目标摄像头对应的排布位置及对应的画面尺寸。
  10. 根据权利要求9所述的方法,其中,所述根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面,包括:
    若所述画面形状为所述竖版画面,且第二摄像头对应的设备类型为竖屏设备,则根据所述第二摄像头对应的画面尺寸,对所述第二摄像头对应的图像数据进行压缩,得到所述第二摄像头对应的图像画面,并在所述第二摄像头对应的排布位置显示所述第二摄像头对应的图 像画面;
    若所述画面形状为所述竖版画面,且第三摄像头对应的设备类型为横屏设备,则根据目标竖版截取框从所述第三摄像头对应的图像数据中截取所述第三摄像头对应的图像画面,并根据所述第三摄像头对应的排布位置及画面尺寸显示所述第三摄像头对应的图像画面;
    其中,所述第二摄像头及第三摄像头均为任一目标摄像头,目标竖版截取框的长小于高。
  11. 根据权利要求9所述的方法,其中,所述根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面,包括:
    若所述横版形状为所述横版画面,且第三摄像头对应的设备类型为横屏设备,则根据所述第三摄像头对应的画面尺寸,对所述第三摄像头对应的图像数据进行压缩,得到所述第三摄像头对应的图像画面,并在所述第三摄像头对应的排布位置显示所述第三摄像头对应的图像画面;
    若所述横版形状为所述横版画面,且第二摄像头对应的设备类型为竖屏设备,则根据目标横版截取框从所述第二摄像头对应的图像数据中截取所述第二摄像头对应的图像画面,并根据所述第二摄像头对应的排布位置及画面尺寸显示所述第二摄像头对应的图像画面;
    其中,所述第二摄像头及第三摄像头均为任一目标摄像头,目标竖版截取框的长小于高,所述目标横版截取框的长小于高。
  12. 根据权利要求1~6、8~11任一所述的方法,其中,所述根据目标摄像头的数量,确定第一界面布局,包括:
    若所述目标摄像头的数量大于第二数量阈值,则确定第一界面布局为可拖动布局;
    若所述目标摄像头的数量小于或等于所述第二数量阈值,则确定第一界面布局为不可拖动布局;
    所述根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面,包括:
    若所述第一界面布局为可拖动布局,则根据所述图像数据,按照所述第一界面布局在当前用户界面中显示第一部分的目标摄像头分别对应的图像画面;
    若所述第一界面布局为不可拖动布局,则根据所述图像数据,按照所述第一界面布局在当前用户界面中显示每一所述目标摄像头对应的图像画面。
  13. 根据权利要求12所述的方法,其中,在所述按照所述第一界面布局在当前用户界面中显示第一部分的目标摄像头分别对应的图像画面之后,所述方法还包括:
    响应于针对所述当前用户界面的拖动操作,显示第二部分的目标摄像头分别对应的图像画面,所述第二部分的目标摄像头区别于所述第一部分的目标摄像头。
  14. 根据权利要求1~11任一所述的方法,其中,所述方法还包括:
    在检测到所述目标摄像头的数量发生变化时,根据变化后的数量确定第二界面布局;
    根据变化后的各个目标摄像头采集的图像数据,按照所述第二界面布局,在当前用户界面中显示所述变化后的各个目标摄像头对应的图像画面。
  15. 根据权利要求14所述的方法,其中,在检测到所述目标摄像头的数量发生变化时,根据变化后的数量确定第二界面布局,包括:
    若所述目标摄像头的数量从第一数量减少至第二数量,且所述第一数量大于第三数量阈值,所述第二数量小于或等于所述第三数量阈值,或所述第一数量及第二数量均小于或等于所述第三数量阈值,则根据所述第二数量重新确定变化后的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局;
    若所述目标摄像头的数量从第一数量减少至第二数量,且所述第一数量及第二数量均大于所述第三数量阈值,则删除减少的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局。
  16. 根据权利要求14所述的方法,其中,在检测到所述目标摄像头的数量发生变化时,根据变化后的数量确定第二界面布局,包括:
    若所述目标摄像头的数量从第一数量增加至第三数量,且所述第一数量小于或等于第三数量阈值,所述第三数量大于第三数量阈值,或所述第一数量及第三数量均小于或等于所述第三数量阈值,则根据所述第三数量重新确定变化后的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局;
    若所述目标摄像头的数量从第一数量增加至第三数量,且所述第一数量及第三数量均大于所述第三数量阈值,则确定增加的各个目标摄像头对应的排布位置及对应的画面尺寸,以得到第二界面布局。
  17. 根据权利要求1~11任一所述的方法,其中,所述方法还包括:
    响应于针对目标图像画面的查看操作,显示与所述目标图像画面对应的目标摄像头采集的图像数据,其中,所述目标图像画面为任一目标摄像头对应的图像画面。
  18. 根据权利要求1~11任一所述的方法,其中,所述方法还包括:
    响应于拍摄操作,向各个所述目标摄像头对应的目标设备发送拍摄指令,所述拍摄指令 用于指示所述目标设备控制自身的目标摄像头进行图像拍摄,得到目标图像;
    获取各个所述目标设备得到的目标图像,并按照所述第一界面布局对所述目标图像进行拼接,得到拼接图像。
  19. 根据权利要求18所述的方法,其中,所述第一界面布局包括各个所述目标摄像头对应的画面尺寸;所述拍摄指令携带有设置在目标设备上的目标摄像头对应的画面尺寸;
    所述拍摄指令用于指示所述目标设备控制自身的目标摄像头进行拍摄,得到待处理图像,并按照所述拍摄指令携带的画面尺寸对所述待处理图像进行截取,得到目标图像。
  20. 根据权利要求18所述的方法,其中,在所述得到拼接图像后,所述方法还包括:
    将所述拼接图像分别同步到各个所述目标设备。
  21. 一种图像显示装置,其中,应用于第一设备,所述第一设备与至少一个第二设备建立通信连接;所述装置包括:
    摄像头确定模块,被配置为从所述第一设备及所述至少一个第二设备上设置的各个摄像头中,确定至少一个目标摄像头;
    布局确定模块,被配置为根据目标摄像头的数量,确定第一界面布局;
    数据获取模块,被配置为获取各个所述目标摄像头采集的图像数据;
    显示模块,被配置为根据所述图像数据,按照所述第一界面布局在当前用户界面中显示至少部分所述目标摄像头分别对应的图像画面。
  22. 一种电子设备,其中,包括存储器及处理器,所述存储器中存储有计算机程序,所述处理器被配置为执行所述计算机程序时实现如权利要求1至20任一所述的方法。
  23. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1至20任一所述的方法。
PCT/CN2022/127702 2021-11-25 2022-10-26 图像显示方法、装置、电子设备及计算机可读存储介质 WO2023093438A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111413006.8A CN114025098A (zh) 2021-11-25 2021-11-25 图像显示方法、装置、电子设备及计算机可读存储介质
CN202111413006.8 2021-11-25

Publications (1)

Publication Number Publication Date
WO2023093438A1 true WO2023093438A1 (zh) 2023-06-01

Family

ID=80066557

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/127702 WO2023093438A1 (zh) 2021-11-25 2022-10-26 图像显示方法、装置、电子设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN114025098A (zh)
WO (1) WO2023093438A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117499601A (zh) * 2024-01-02 2024-02-02 上海励驰半导体有限公司 用于SoC的调用多摄像头数据的方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114025098A (zh) * 2021-11-25 2022-02-08 Oppo广东移动通信有限公司 图像显示方法、装置、电子设备及计算机可读存储介质
CN114500901A (zh) * 2022-04-02 2022-05-13 荣耀终端有限公司 双景录像方法、装置和电子设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105357498A (zh) * 2015-12-10 2016-02-24 广东欧珀移动通信有限公司 一种移动终端摄像头的共享方法及装置
CN110072070A (zh) * 2019-03-18 2019-07-30 华为技术有限公司 一种多路录像方法及设备
CN111050077A (zh) * 2019-12-26 2020-04-21 维沃移动通信有限公司 拍摄方法及电子设备
CN112954196A (zh) * 2021-01-27 2021-06-11 维沃移动通信有限公司 拍摄方法、装置、电子设备及可读存储介质
CN113542581A (zh) * 2020-04-22 2021-10-22 华为技术有限公司 多路录像的取景方法、图形用户界面及电子设备
CN114025098A (zh) * 2021-11-25 2022-02-08 Oppo广东移动通信有限公司 图像显示方法、装置、电子设备及计算机可读存储介质

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109407839B (zh) * 2018-10-18 2020-06-30 京东方科技集团股份有限公司 图像调整方法、装置、电子设备和计算机可读存储介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105357498A (zh) * 2015-12-10 2016-02-24 广东欧珀移动通信有限公司 一种移动终端摄像头的共享方法及装置
CN110072070A (zh) * 2019-03-18 2019-07-30 华为技术有限公司 一种多路录像方法及设备
CN112954219A (zh) * 2019-03-18 2021-06-11 荣耀终端有限公司 一种多路录像方法及设备
CN112954218A (zh) * 2019-03-18 2021-06-11 荣耀终端有限公司 一种多路录像方法及设备
CN111050077A (zh) * 2019-12-26 2020-04-21 维沃移动通信有限公司 拍摄方法及电子设备
CN113542581A (zh) * 2020-04-22 2021-10-22 华为技术有限公司 多路录像的取景方法、图形用户界面及电子设备
CN112954196A (zh) * 2021-01-27 2021-06-11 维沃移动通信有限公司 拍摄方法、装置、电子设备及可读存储介质
CN114025098A (zh) * 2021-11-25 2022-02-08 Oppo广东移动通信有限公司 图像显示方法、装置、电子设备及计算机可读存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117499601A (zh) * 2024-01-02 2024-02-02 上海励驰半导体有限公司 用于SoC的调用多摄像头数据的方法
CN117499601B (zh) * 2024-01-02 2024-04-05 上海励驰半导体有限公司 用于SoC的调用多摄像头数据的方法

Also Published As

Publication number Publication date
CN114025098A (zh) 2022-02-08

Similar Documents

Publication Publication Date Title
WO2023093438A1 (zh) 图像显示方法、装置、电子设备及计算机可读存储介质
US20230393721A1 (en) Method and Apparatus for Dynamically Displaying Icon Based on Background Image
US10715762B2 (en) Method and apparatus for providing image service
EP4130963A1 (en) Object dragging method and device
JP6186775B2 (ja) 通信端末、表示方法、及びプログラム
US10009543B2 (en) Method and apparatus for displaying self-taken images
US9525844B2 (en) Mobile terminal and method for transmitting image therein
US11895567B2 (en) Lending of local processing capability between connected terminals
US20220408020A1 (en) Image Processing Method, Electronic Device, and Cloud Server
US9083849B2 (en) Transmission terminal, transmission system, and non-transitory computer readable storage medium
CN110798622B (zh) 一种共享拍摄方法及电子设备
CN111935402B (zh) 图片的拍摄方法、终端设备及计算机可读存储介质
WO2023045641A1 (zh) 图像裁剪方法、装置、计算机设备及存储介质
WO2022105803A1 (zh) 摄像头调用方法、系统及电子设备
CN111083371A (zh) 拍摄方法和电子设备
EP4318383A1 (en) Video processing method and apparatus
EP2913753A1 (en) Transmission terminal, transmission system, transmission method, and carrier means
CN114363678A (zh) 一种投屏方法及设备
WO2022222773A1 (zh) 拍摄方法、相关装置及系统
WO2022088926A1 (zh) 一种拍摄方法和终端设备
EP3937485A1 (en) Photographing method and apparatus
CN114040108A (zh) 一种辅助拍摄方法、装置、终端和计算机可读存储介质
CN111064894A (zh) 图像处理方法、终端设备及计算机可读存储介质
WO2022262452A1 (zh) 一种视频拍摄方法及电子设备
CN114827700A (zh) 投屏内容的显示方法、装置、终端及存储介质