CN111612838A - Image acquisition method and device and electronic equipment - Google Patents

Image acquisition method and device and electronic equipment Download PDF

Info

Publication number
CN111612838A
CN111612838A CN202010479019.4A CN202010479019A CN111612838A CN 111612838 A CN111612838 A CN 111612838A CN 202010479019 A CN202010479019 A CN 202010479019A CN 111612838 A CN111612838 A CN 111612838A
Authority
CN
China
Prior art keywords
image
display area
pixel
original image
determining
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202010479019.4A
Other languages
Chinese (zh)
Inventor
王志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202010479019.4A priority Critical patent/CN111612838A/en
Publication of CN111612838A publication Critical patent/CN111612838A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1423Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display
    • G06F3/1446Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display display composed of modules, e.g. video walls

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The embodiment of the invention provides an image acquisition method, an image acquisition device and electronic equipment. The method comprises the following steps: determining an original image to be intercepted; determining target position information of a designated pixel point in the display area in the original image based on the calibration pixel point and a preset inclination angle of the display area; the display area is used for displaying a sub-image of the original image; determining a target pixel value of a designated pixel point based on the target position information and the pixel values of the pixel points in the original image; and obtaining a sub-image corresponding to the display area based on the target pixel value. Compared with the prior art, by applying the scheme provided by the embodiment of the invention, the sub-image of the image matched with the display area can be obtained when the image is displayed through the display area which is arranged irregularly.

Description

Image acquisition method and device and electronic equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image acquisition method and apparatus, and an electronic device.
Background
Currently, with the continuous development of image processing technology, in various places such as shopping malls and exhibition halls, in order to determine better display effect, one display image can be displayed by splicing a plurality of display screens, for example, as shown in fig. 1, an image with a dragonfly staying on a flower is displayed by 12 display screens. In order to realize the normal display of the image in each display screen, it is necessary to determine the sub-image that each display screen needs to display, that is, each display screen can be used as a presentation area, so as to obtain the sub-image that each presentation area is adapted to.
In the related art, the method for obtaining the sub-image adapted to each display area includes: and according to the number and the splicing mode of the plurality of display screens, performing multi-equal division on the original image to be intercepted, thereby obtaining sub-images which are required to be displayed by each display screen and are adaptive to the display screen.
For example, as shown in fig. 1, the original image is divided into equal parts in a manner of three rows and four columns to obtain 12 equal-part images, and each sub-image can be used as image content to be displayed on a display screen, so that each display device can display the sub-image adapted to itself in the 12 equal-part sub-images.
However, the above-mentioned related art is applicable to the case where a plurality of display regions are regularly arranged in a matrix form. When an image is displayed through a plurality of display areas which are arranged irregularly, how to obtain sub-images which are adaptive to the display of each display area is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the invention aims to provide an image acquisition method, an image acquisition device and electronic equipment, so that when an image is displayed through a display area which is irregularly arranged, a sub-image of the image matched with the display area is obtained. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides an image acquisition method, where the method includes:
determining an original image to be intercepted;
determining target position information of designated pixel points in the display area in the original image based on the calibration pixel points and a preset inclination angle of the display area; wherein, the display area is used for displaying a sub-image of the original image;
determining a target pixel value of the designated pixel point based on the target position information and pixel values of pixel points in the original image;
and obtaining a sub-image corresponding to the display area based on the target pixel value.
Optionally, in a specific implementation manner, the number of the preset display areas is multiple; the step of obtaining the sub-image corresponding to the display area based on the target pixel value includes:
obtaining sub-images corresponding to each display area based on the target pixel value of the designated pixel point in each display area, wherein the identification of each display area corresponds to the identification of the corresponding sub-image one by one;
after obtaining the sub-image corresponding to the presentation area, the method further includes:
and rendering each display area according to the identification of each sub-image and the identification of each display area, and displaying the sub-images of each display area.
Optionally, in a specific implementation manner, the step of determining, based on the calibration pixel and a preset inclination angle of the display area, target position information of a designated pixel in the display area in the original image includes:
determining the position variation of the designated pixel point in the image coordinate system of the original image compared with the calibrated pixel point according to the inclination angle and the difference value between the designated pixel point and the calibrated pixel point in the pixel coordinate system of the display area;
and determining the target position information of the designated pixel point in the original image according to the position information of the calibrated pixel point in the original image and the position variation.
Optionally, in a specific implementation manner, the step of determining the target pixel value of the designated pixel point based on the target position information and the pixel value of the pixel point in the original image includes:
determining a plurality of pixel points in the original image, wherein the position relationship between the image coordinates and the target position information meets a preset relationship;
and determining a target pixel value of the specified pixel point based on the determined pixel values of the plurality of pixel points.
Optionally, in a specific implementation manner, in the original image, the step of determining, in the original image, a plurality of pixel points whose position relationship between the image coordinate and the target position information satisfies a preset relationship includes:
determining four pixel points in the original image according to the target position information; wherein the four pixel points are four vertexes of a rectangle containing the position point indicated by the target position information;
the step of determining a target pixel value of the designated pixel point based on the determined pixel values of the plurality of pixel points includes:
and determining a target pixel value of the specified pixel point by utilizing the bilinear interpolation and the determined pixel values of the four pixel points.
In a second aspect, an embodiment of the present invention provides an image capturing apparatus, including:
the image determining module is used for determining an original image to be intercepted;
the position information determining module is used for calibrating pixel points, determining target position information of specified pixel points in the display area in the original image based on a preset inclination angle of the display area; wherein, the display area is used for displaying a sub-image of the original image;
a pixel value determining module, configured to determine a target pixel value of the designated pixel point based on the target position information and a pixel value of a pixel point in the original image;
and the image acquisition module is used for obtaining the sub-image corresponding to the display area based on the target pixel value.
Optionally, in a specific implementation manner, the number of the preset display areas is multiple; the image acquisition module is specifically configured to:
obtaining sub-images corresponding to each display area based on the target pixel value of the designated pixel point in each display area, wherein the identification of each display area corresponds to the identification of the corresponding sub-image one by one;
the device further comprises:
and the image rendering module is used for rendering each display area according to the identifier of each sub-image and the identifier of each display area after the sub-image corresponding to the display area is obtained, and displaying the sub-image of each display area.
Optionally, in a specific implementation manner, the location information determining module is specifically configured to:
determining the position variation of the designated pixel point in the image coordinate system of the original image compared with the calibrated pixel point according to the inclination angle and the difference value between the designated pixel point and the calibrated pixel point in the pixel coordinate system of the display area;
and determining the target position information of the designated pixel point in the original image according to the position information of the calibrated pixel point in the original image and the position variation.
Optionally, in a specific implementation manner, the pixel value determining module includes:
the pixel point determining submodule is used for determining a plurality of pixel points in the original image, wherein the position relationship between the image coordinate and the target position information meets a preset relationship;
and the pixel value determining submodule is used for determining a target pixel value of the specified pixel point based on the determined pixel values of the plurality of pixel points.
Optionally, in a specific implementation manner, in the original image, the pixel point determining submodule is specifically configured to:
determining four pixel points in the original image according to the target position information; wherein the four pixel points are four vertexes of a rectangle containing the position point indicated by the target position information;
the pixel value determination submodule is specifically configured to: and determining a target pixel value of the specified pixel point by utilizing the bilinear interpolation and the determined pixel values of the four pixel points.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory;
a memory for storing a computer program;
a processor configured to implement the steps of any of the image acquisition methods of the first aspect described above when executing a program stored in the memory.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any one of the image acquisition methods in the first aspect.
In a fifth aspect, embodiments of the present invention provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of any of the image acquisition methods of the first aspect.
The embodiment of the invention has the following beneficial effects:
by applying the scheme provided by the embodiment of the invention, the inclination angles of the preset calibration pixel point and the preset display area can be obtained for the determined original image to be intercepted; therefore, target position information of the designated pixel point in the display area in the original image can be determined based on the inclination angle and the calibration pixel point; furthermore, the target pixel value of the designated pixel point in the display area can be determined based on the determined target position information and the pixel value of the pixel point in the original image, so that the sub-image corresponding to the display area can be obtained based on the target pixel value, and the sub-image is the sub-image of the original image matched with the display area.
Based on this, by applying the scheme provided by the embodiment of the present invention, when determining the sub-image adapted to the display area, the target pixel value of the designated pixel point in the display area can be determined from the original image directly based on the calibration pixel point and the inclination angle of the display area, so as to obtain the sub-image required to be displayed by the display area. Obviously, no matter how the display areas are arranged, as long as the inclination angles of the calibration pixel points and each display area are obtained, the target pixel values of the specified pixel points in the display areas can be determined from the original image, and the sub-images required to be displayed in the display areas can be obtained. Furthermore, when one image is displayed through a plurality of display areas which are arranged irregularly, the scheme provided by the embodiment of the invention can be utilized to obtain the sub-images which are matched with the display areas.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of an effect of displaying an image on a plurality of display screens arranged regularly in a matrix form;
FIG. 2 is an interface diagram of a client for executing an image capture method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of an image obtaining method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a position relationship between an original image to be captured and a preset display area;
FIG. 5 is a flowchart illustrating an embodiment of S302 in FIG. 3;
FIG. 6 is a flowchart illustrating an embodiment of S303 in FIG. 3;
FIG. 7 is a schematic diagram of a plurality of pixels in the determined original image to be captured, where the positional relationship between the image coordinates and the target position information satisfies a preset relationship;
fig. 8 is a schematic structural diagram of an image capturing apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the related art, the method for obtaining the sub-image adapted to each display area includes: and according to the number and the splicing mode of the plurality of display screens, performing multi-equal division on the original image to be intercepted, thereby obtaining sub-images which are required to be displayed by each display screen and are adaptive to the display screen. However, the above-described related art is applicable to a case where a plurality of display screens are regularly arranged in a matrix form. When an image is displayed through a plurality of display areas which are arranged irregularly, how to obtain sub-images which are matched with the display areas is an urgent problem to be solved.
In order to solve the above technical problem, an embodiment of the present invention provides an image acquisition method. The method can be applied to any application scene in which a display image is spliced and displayed through a plurality of display areas, for example, a game picture, an advertisement display screen of a shopping mall, a remote display screen of a stage performance and the like are displayed through a plurality of areas in a client. Also, the method may be applied to any type of electronic device, for example, a mobile phone, a notebook computer, a desktop computer. In this regard, the embodiment of the present invention does not specifically limit the application scenario and the execution subject of the embodiment of the present invention.
In addition, the electronic device to which the image acquisition method provided by the embodiment of the invention is applied can be located in a certain video system, for example, a video monitoring system, a stage performance remote playing system, and the like.
Optionally, when the electronic device executes the image obtaining method provided by the embodiment of the present invention, the electronic device may be implemented by a client installed in the electronic device, that is, a client for executing the image obtaining method provided by the embodiment of the present invention is installed in the electronic device.
For example, as shown in fig. 2, the present invention is an interface diagram of a client executing an image capturing method according to an embodiment of the present invention. The image displayed in the acquisition area preview is an original image to be intercepted; and the four areas marked with 1-4 numerical labels on the right are the respective display areas for displaying the sub-images of the original image to be cut.
The image acquisition method provided by the embodiment of the invention can comprise the following steps:
determining an original image to be intercepted;
determining target position information of designated pixel points in the display area in the original image based on the calibration pixel points and a preset inclination angle of the display area; wherein, the display area is used for displaying a sub-image of the original image;
determining a target pixel value of the designated pixel point based on the target position information and pixel values of pixel points in the original image;
and obtaining a sub-image corresponding to the display area based on the target pixel value.
As can be seen from the above, by applying the scheme provided by the embodiment of the present invention, for the determined original image to be captured, the inclination angles of the preset calibration pixel point and the preset display area can be obtained; therefore, target position information of the designated pixel points in the display area in the original image can be determined based on the inclination angle and the calibration pixel points; furthermore, the target pixel value of the designated pixel point in the display area can be determined based on the determined target position information and the pixel value of the pixel point in the original image, so that the sub-image corresponding to the display area can be obtained based on the target pixel value, and the sub-image is the sub-image of the original image matched with the display area.
Based on this, by applying the scheme provided by the embodiment of the present invention, when determining the sub-image adapted to the display area, the target pixel value of the designated pixel point in the display area can be determined from the original image directly based on the calibration pixel point and the inclination angle of the display area, so as to obtain the sub-image required to be displayed by the display area. Obviously, no matter how the display areas are arranged, as long as the inclination angles of the calibration pixel points and each display area are obtained, the target pixel values of the specified pixel points in the display areas can be determined from the original image, and the sub-images required to be displayed in the display areas can be obtained. Furthermore, when an image is displayed through a plurality of display areas which are arranged irregularly, the scheme provided by the embodiment of the invention can be utilized to obtain the sub-images which are matched with the display areas.
Next, an image acquisition method provided by an embodiment of the present invention is specifically described.
Fig. 3 is a schematic flowchart of an image obtaining method according to an embodiment of the present invention, and as shown in fig. 3, the method includes the following steps:
s301: determining an original image to be intercepted;
the electronic device may first acquire an image, and then may determine to obtain an original image to be captured according to the image.
Optionally, the electronic device may directly determine the acquired image as an original image to be intercepted;
optionally, when the size of the image acquired by the electronic device is different from the size of a screen region for displaying the original image to be displayed in the display screen of the electronic device, the electronic device may further normalize the acquired image according to the size of the screen region, so that the normalized image is determined as the original image to be captured.
In addition, it should be noted that the electronic device may acquire an image in multiple ways, and the embodiment of the present invention is not limited in particular. For example, the image may be an image stored locally by the electronic device, or may be an image acquired by the electronic device from another electronic device.
Moreover, the image may be a single image or a video frame in a video. When the image is a certain video frame in a segment of video, the electronic device may continuously acquire a plurality of continuous frames of video frames in the video, and determine an original image to be captured according to each acquired frame of video, so as to execute the image acquisition method provided by the embodiment of the present invention for each determined original image to be captured, thereby continuously obtaining sub-images in each video frame of the segment of video, the sub-images being adapted to the display area.
S302: determining target position information of a designated pixel point in the display area in the original image based on the calibration pixel point and a preset inclination angle of a preset display area;
wherein, the display area is used for displaying the sub-image of the original image.
After the original image to be captured is determined, the electronic device may determine, based on the preset calibration pixel and the preset inclination angle of the display area, the target position information of the designated pixel in the display area in the original image, where the target position information may be represented as: and displaying the image coordinates of the designated pixel points in the region in the image coordinate system of the original image.
For a preset presentation area, the presentation area is used for presenting a sub-image of an original image to be captured, and the sub-image is captured from the original image to be captured.
The designated pixel points in the preset display area can be all the pixel points of the display area, also can be a plurality of representative pixel points in the display area, and also can be a plurality of arbitrarily selected pixel points in all the pixel points of the display area, which is reasonable. In this regard, the embodiment of the present invention does not specifically limit the number and distribution of designated pixels in the display area.
The calibration pixel point can be any pixel point in the display area, and can also be any pixel point outside the display area. And whether the calibration pixel point is located in the display area or outside the display area, the pixel coordinate of the calibration pixel point in the pixel coordinate system of the display area can be determined, and the image coordinate of the calibration pixel point in the image coordinate system of the original image to be intercepted is the position information of the calibration pixel point in the original image.
In addition, for a predetermined display area, the display area may be placed at any inclination angle.
For example, as shown in FIG. 4, a rectangle with width W and height H is the original image to be cut, i.e. the input source in FIG. 4, and a rectangle with width W1 and height H1 in the input source is the preset display area for displaying a sub-image of the input source, wherein the preset inclination angle of the display area is α, obviously, the display area can be obtained by inclining the layout position with width and height parallel to the width and height of the input source, respectively, clockwise by α, and the starting point P in the display area can be determined0As a calibration pixel point, the starting point P0The image coordinates in the image coordinate system of the input source are the starting points P0Location information in the input source.
Optionally, the calibration pixel point may be preset, or determined according to a user selection operation on a certain point inside or outside the display area before executing the step S302, for example, clicking a certain point in the display area as the calibration pixel point.
And optionally, the electronic device may receive a dragging operation of the user on the preset display area, so that a position of the display area relative to the original image to be captured may be changed, that is, a preset inclination angle of the display area may be changed.
After the preset inclination angle of the display area is changed, the position relationship between the pixel coordinate system of the display area and the image coordinate system of the original image to be intercepted can be changed.
In this way, after the preset inclination angle of the display area is changed, for the calibration pixel point located in the display area, the pixel coordinate of the calibration pixel point in the pixel coordinate system of the display area may not be changed, but the position information of the calibration pixel point in the original image to be captured may be changed. Correspondingly, for the calibration pixel point located outside the display area, the pixel coordinate of the calibration pixel point in the pixel coordinate system of the display area may be changed, but the position information of the calibration pixel point in the original image to be intercepted may not be changed.
The electronic device may determine the calibration pixel point before dragging the display area, or may determine the calibration pixel point after dragging the display area. This is all reasonable. Furthermore, after the dragging is finished and the calibration pixel point is appointed, the electronic equipment can determine the position information of the calibration pixel point in the original image to be intercepted and the inclination angle of the display area.
In addition, the electronic equipment can determine the position information of the calibration pixel point in the original image to be intercepted and the preset inclination angle of the display area in various ways. The embodiment of the present invention is not particularly limited.
For example, when the calibration pixel point is located in the display area, the electronic device may obtain initial position information of the calibration pixel point in the original image to be captured and an initial tilt angle of the preset display area before receiving a dragging operation of a user on the preset display area, and then, the electronic device may calculate and obtain the position information of the calibration pixel point in the original image to be captured and the tilt angle of the display area after dragging according to a dragging track of the display area.
Further, the electronic device may perform the step S302 in various ways, and the embodiment of the present invention is not limited in particular. For clarity, a specific manner of executing the step S302 by the electronic device will be illustrated in the following.
S303: determining a target pixel value of a designated pixel point in the display area based on the target position information and the pixel value of the pixel point in the original image;
it should be noted that the target position information of the designated pixel point in the preset display area in the original image may be represented as: the image coordinates of the designated pixel point in the image coordinate system of the original image; furthermore, although the pixel coordinates of the designated pixel point in the pixel coordinate system of the display area are integer coordinates, since a trigonometric function is involved in determining the target position information of the designated pixel point in the original image, the obtained image coordinates for representing the target position information of the designated pixel in the original image may be non-integer coordinates.
Further, since each pixel point in the original image to be captured is also an integer coordinate in the image coordinate system in the original image, the point indicated by the target position information of the specified pixel point in the original image is not necessarily a pixel point in the original image. Obviously, if the point indicated by the determined target position information of the specified pixel point in the original image is not a pixel point in the original image, the electronic device cannot directly acquire the pixel value of the specified pixel point from the original image to be displayed.
Based on this, after determining the target position information of the designated pixel point in the display area in the original image, the electronic device may determine the target pixel value of the designated pixel point based on the target position information and the pixel value of the pixel point in the original image.
The electronic device may perform the step S303 in various ways, and the embodiment of the present invention is not limited in this respect. For clarity, a specific manner of executing the step S303 by the electronic device will be illustrated in the following.
S304: and obtaining a sub-image corresponding to the display area based on the target pixel value.
Aiming at a preset display area, after a target pixel of a designated pixel point in the display area is obtained, pixel value filling can be carried out on the designated pixel point based on the target pixel value, and a sub-image corresponding to the display area is obtained. And the obtained sub-image corresponding to the display area is the sub-image which is matched with the display area in the original image to be intercepted.
Thus, the electronic device can obtain the image data of the sub-image corresponding to the display area. Therefore, the electronic device may perform subsequent operations such as saving and displaying on the image data, which is not limited in the embodiment of the present invention.
Optionally, in a specific implementation manner, the preset display area may be a certain preset area in a display interface of the electronic device. For example, as shown in fig. 2, when the electronic device implements an image display mode provided by an embodiment of the present invention through an installed client, an interface of the client is displayed in a display interface of the electronic device, and display areas 1 to 4 exist in the interface of the client. The electronic device may then render the presentation area using the obtained sub-image. In this way, the electronic device may display the resulting sub-image in the presentation area. Obviously, in this particular implementation, the sub-images may be displayed locally at the electronic device.
Optionally, in a specific implementation manner, the preset display area may be a display screen in communication connection with the electronic device. Furthermore, the electronic device may send the obtained sub-image to the display screen, so that the display screen renders the display screen by using the sub-image after receiving the sub-image. In this way, the sub-picture can be displayed in the display screen. Obviously, in this particular implementation, the sub-image may not be displayed locally at the electronic device, but only in the display screen of the communicatively connected display screen.
Optionally, in a specific implementation manner, the preset display area may be a certain preset area in a display interface of the electronic device, and the electronic device is in communication connection with a display screen. The electronic device may then render the presentation area using the resulting sub-image. In this way, the electronic device may display the resulting sub-image in the presentation area.
Moreover, in this specific implementation manner, the electronic device may further send the sub-image to the display screen connected to the communication, so that the display screen renders the display screen by using the sub-image after receiving the sub-image. In this way, the resulting sub-image can be displayed in the display screen.
It is clear that in this particular implementation, the resulting sub-images may be displayed simultaneously in both the display screens of the electronic device local and communication connections.
It should be noted that, in this specific implementation manner, since the size of the display screen and the size of the display area in the electronic device may be different, for example, the size of the display screen is larger than the size of the display area, when sending the obtained sub-image to the display screen connected in communication to display the sub-image in the display screen, when the display screen displays the sub-image, the sub-image may be proportionally enlarged or reduced according to the size proportional relationship between the display screen and the display area, so that the size of the enlarged or reduced sub-image is adapted to the size of the display screen.
Obviously, in the embodiment of the present invention, obtaining the sub-image corresponding to the display area and displaying the sub-image may be performed asynchronously, so that the operation of the whole process is smooth, and the occurrence of the pause phenomenon may be reduced.
It will be appreciated that in many cases, an original image to be captured may be displayed via a plurality of presentation areas, i.e. there may be a plurality of predetermined presentation areas.
Based on this, in this specific implementation manner, the step S304 of obtaining the sub-image corresponding to the display area based on the target pixel value may include the following steps:
and obtaining sub-images corresponding to the display areas based on the target pixel values of the designated pixel points in the display areas, wherein the identifications of the display areas correspond to the identifications of the corresponding sub-images one by one.
Furthermore, in this specific implementation manner, the image obtaining method provided in the embodiment of the present invention may further include the following steps:
and rendering each display area according to the identification of each sub-image and the identification of each display area, and displaying the sub-images of each display area.
In this specific implementation manner, the electronic device may execute the image obtaining method provided in the foregoing embodiment of the present invention for each display area, so as to obtain a sub-image corresponding to the display area. In addition, in order to enable the sub-images to correspond to the presentation areas one to one, identifiers may be added to the obtained sub-images, where the identifier of each presentation area corresponds to the identifier of the corresponding sub-image one to one.
For example, after a sub-image corresponding to a presentation area is obtained, the identifier of the presentation area may be used as the identifier of the sub-image, and the identifier may be added to the sub-image. Therefore, each display area and the sub-image corresponding to the display area have the same identification. Of course, after obtaining a sub-image corresponding to a presentation area, an identifier different from but corresponding to the identifier of the presentation area may be added to the sub-image, so that each sub-image corresponding to the presentation area and each presentation area has a corresponding identifier.
Therefore, the sub-images corresponding to the display areas are obtained, and the display areas can be rendered according to the identifications of the sub-images and the identifications of the display areas, so that the sub-images of the display areas are displayed.
That is, after obtaining each sub-image with an identifier, for each sub-image, the identifier of the display area for rendering the sub-image may be determined according to the identifier of the sub-image, and thus, for the display area with the determined identifier, the sub-image may be used to render the display area, so that the sub-image may be displayed in the display area.
The electronic device may sequentially execute the image obtaining method provided in the embodiment of the present invention for each display area to obtain the sub-image corresponding to the display area, and immediately render the display area using the obtained sub-image after obtaining the sub-image, so that the sub-image is displayed in the display area. That is, the electronic device may obtain the sub-images corresponding to each of the display areas in sequence, and then display the sub-images in each of the display areas in sequence.
The electronic device may also execute the image obtaining method provided in the above embodiment of the present invention for each display area, so as to obtain the sub-images of each display area at the same time, render each display area according to the identifier of each sub-image and the identifier of each display area, and display the sub-images of each display area. That is, the electronic device may simultaneously display the sub-images in the respective presentation areas.
The electronic device may further sequentially obtain the sub-images corresponding to the display area, and after obtaining each sub-image, determine whether the sub-images corresponding to all the display areas have been obtained. If not, continuing to obtain the sub-images corresponding to the next display area, and if so, rendering each display area according to the identification of each sub-image and the identification of each display area, and displaying the sub-images of each display area. That is, the electronic device may obtain the sub-images corresponding to each presentation area in turn, but display the sub-images in the respective presentation areas at the same time.
As can be seen from the above, by applying the scheme provided by the embodiment of the present invention, when determining the sub-image adapted to the display area, the target pixel value of the designated pixel point in the display area can be determined from the original image directly based on the calibration pixel point and the inclination angle of the display area, so as to obtain the sub-image to be displayed in the display area. Obviously, no matter how the display areas are arranged, as long as the inclination angles of the calibration pixel points and each display area are obtained, the target pixel values of the specified pixel points in the display areas can be determined from the original image, and the sub-images required to be displayed in the display areas can be obtained. Furthermore, when an image is displayed through a plurality of display areas which are arranged irregularly, the scheme provided by the embodiment of the invention can be utilized to obtain the sub-images which are matched with the display areas.
Optionally, in a specific implementation manner, as shown in fig. 5, in the step S302, determining the target position information of the designated pixel point in the display area in the original image based on the calibration pixel point and the preset inclination angle of the preset display area, the step may include the following steps:
s501: determining the position variation of the designated pixel point in the image coordinate system of the original image compared with the calibration pixel point according to the inclination angle and the difference value between the designated pixel point and the calibration pixel point in the pixel coordinate system of the display area;
s502: and determining the target position information of the designated pixel point in the original image according to the position information and the position variation of the calibrated pixel point in the image coordinate system.
In this specific implementation manner, after the inclination angles of the calibration pixel point and the preset display area are determined, the difference between the pixel coordinates of the calibration pixel point and the pixel coordinates of the designated pixel point in the display area in the pixel coordinate system of the display area may be determined first.
Wherein, the straight lines of the X axis and the Y axis of the pixel coordinate system can be respectively: a straight line along the oblique direction and a straight line perpendicular to the oblique direction.
And then, according to the determined difference, determining the position variation of the designated pixel point compared with the calibration pixel point in the image coordinate system of the original image to be intercepted. Therefore, the target position information of the designated pixel point in the original image can be determined according to the position variation and the position information of the calibrated pixel point in the image coordinate system of the original image.
And the position information of the calibration pixel point in the image coordinate system of the original image is the position information of the calibration pixel point in the original image.
Further, on the basis of the specific implementation shown in fig. 5, the step S302 may include the following steps:
determining target position information of a designated pixel point in a display area in an original image by using a preset first formula; wherein the first formula is:
Figure BDA0002516679210000151
wherein (X)0,Y0) For calibrating the position information of the pixel points in the original image, α is the inclination of the preset display areaAn angle; (Δ x)i,Δyi) The difference value between the pixel coordinates of the designated pixel point i and the calibrated pixel point in the pixel coordinate system of the display area is obtained; Δ xicosα-Δyisin α and Δ xisinα+Δyicos α represents the position variation of the designated pixel i in the image coordinate system of the original image compared to the calibration pixel, where Δ xicosα-Δyisin α is the position variation, Δ X, of the designated pixel i in comparison with the calibrated pixel in the X-axis direction of the image coordinate system of the original imageisinα+Δyicos α is the position variation of the designated pixel i in the Y-axis direction in the image coordinate system of the original image compared with the calibration pixel (x)i0,yi0) The target position information of the designated pixel point in the original image is obtained.
The position information of the calibration pixel points in the original image is represented by the image coordinates of the calibration pixel points in the image coordinate system of the original image, and the target position information of the designated pixel points in the original image is represented by the image coordinates of the designated pixel points in the image coordinate system of the original image.
Optionally, in an embodiment, the image coordinate system of the original image to be captured may be: taking the upper left vertex of the original image to be intercepted as an original point, taking a straight line of the original image to be intercepted, which passes through the upper left vertex, as an X axis, taking a straight line of the original image to be intercepted, which passes through the upper left vertex, as a coordinate system established by a Y axis, taking the straight line of the original image to be intercepted, which passes through the upper left vertex, as a positive direction towards the right, and taking the Y axis downwards as a positive direction, obviously, the X axis coordinate and the Y axis coordinate in each image coordinate in the original image to be intercepted are not less than zero;
correspondingly, the pixel coordinate system of the preset display area may be: the marked pixel point of the display area is used as an original point, the straight line of the display area passing through the marked pixel point and located at the width is used as an X axis, the straight line of the display area passing through the marked pixel point and located at the height is used as a coordinate system established by a Y axis, the direction of the X axis moving along the width of the marked pixel point and far away from the marked pixel point is a positive direction, and the direction of the Y axis moving along the height of the marked pixel point and far away from the marked pixel point is a positive direction. Obviously, the X-axis coordinate and the Y-axis coordinate in the pixel coordinates of each pixel point in the display area are not less than zero.
For example, as shown in fig. 4, in the image coordinate system of the original image to be intercepted: the upper left vertex of the input source is an origin, the straight line where the upper edge of the input source is located is an X axis, the right side of the input source is the positive direction of the X axis, the straight line where the left edge of the input source is located is a Y axis, and the downward side of the input source is the positive direction of the Y axis; in the pixel coordinate system of the presentation area: starting point P of display area0Is an origin point, passes through the starting point P0Is the X axis, and the right-down direction is the positive X axis direction, passes through the starting point P0The left downward inclined edge of (2) is the Y axis, and the left downward direction is the positive direction of the Y axis.
Obviously, when each pixel point in the display area is traversed transversely, increasing one pixel is equivalent to increasing cosa in the horizontal direction and increasing sina in the vertical direction of the original image to be intercepted; longitudinally traversing each pixel point in the display area, and adding one pixel every time, which is equivalent to reducing sina in the horizontal direction of the original image to be intercepted; cosa is added in the vertical direction; thus, the target position information of the designated pixel point in the original image can be determined by using the first formula.
In the calculation process of the first formula, only addition and subtraction operations of floating point numbers are involved, and multiplication and division operations of floating point numbers are not involved, that is, target position information of the designated pixel point in the display area in the original image is calculated by an incremental calculation method. Thus, the processing performance of the electronic device can be improved.
Optionally, in a specific implementation manner, as shown in fig. 6, in the step S303, determining the target pixel value of the designated pixel point in the display area based on the target position information and the pixel value of the pixel point in the original image, may include the following steps:
s601: determining a plurality of pixel points in the original image, wherein the position relationship between the image coordinates and the target position information meets a preset relationship;
s602: and determining a target pixel value of the appointed pixel point based on the determined pixel values of the plurality of pixel points.
After determining the target position information of the designated pixel points in the preset display area in the original image to be intercepted, the electronic equipment can determine the position points indicated by the target position information in the original image, and further, the electronic equipment can determine a plurality of pixel points of which the position relationship between the image coordinates and the position points meets the preset relationship in the original image. In this way, the electronic device may determine a target pixel value based on the determined pixel values of the plurality of pixels, and the determined target pixel value is the target pixel value of the designated pixel of the display area.
On the basis of the specific implementation shown in fig. 6, optionally, in another specific implementation, the step S601 may include the following steps:
step 11: determining four pixel points in the original image according to the target position information;
the four pixel points are four vertexes of a rectangle containing the position point indicated by the target position information.
Accordingly, the step S602 may include the following steps:
step 12: and determining a target pixel value of the appointed pixel point by utilizing the bilinear interpolation and the determined pixel values of the four pixel points.
In this specific implementation manner, the electronic device may determine, in the original image, a rectangle including a position point indicated by the target position information of the designated pixel point, where four vertices of the rectangle are all the pixel points, and then the electronic device may determine the four vertices of the rectangle as a plurality of pixels whose position relationship between the image coordinate and the target position information satisfies a preset relationship, and further may determine the target pixel value of the designated pixel point by using the bilinear interpolation and the determined pixel values of the four pixel points.
Optionally, in a specific implementation manner, the step 11 may include the following steps:
step 111: respectively taking an integer part of the X-axis coordinate and the Y-axis coordinate in the target position information to obtain a first X-axis coordinate and a first Y-axis coordinate;
step 112: calculating the sum of the first X-axis coordinate and a preset numerical value and the sum of the first Y-axis coordinate and the preset numerical value to respectively obtain a second X-axis coordinate and a second Y-axis coordinate; wherein the preset numerical value is an integer;
step 113: determining four pixel points corresponding to four image coordinates consisting of a first X-axis coordinate, a first Y-axis coordinate, a second X-axis coordinate and a second Y-axis coordinate in an original image respectively;
wherein the X-axis coordinate of each image coordinate is: the first X-axis coordinate or the second X-axis coordinate, and the Y-axis coordinate is: a first Y-axis coordinate or a second Y-axis coordinate.
Obviously, in this specific implementation, the four image coordinates formed by the first X-axis coordinate, the first Y-axis coordinate, the second X-axis coordinate, and the second Y-axis coordinate are the four vertices of the rectangle containing the position point indicated by the target position information.
In this embodiment, each of the X-axis coordinates and each of the Y-axis coordinates are coordinates in an image coordinate system of the original image to be captured.
Further, optionally, in a specific implementation manner, when the preset value in step 12 is 1, four pixel points whose position relationship between the image coordinate and the target position information satisfies the preset relationship may be determined in the original image by using a preset second formula; wherein the second formula is:
Figure BDA0002516679210000181
wherein, the four confirmed pixel points are respectively: image coordinates (x)i1,yi1)、(xi1,yi2)、(xi2,yi1) And (x)i2,yi2) Respectively corresponding pixel points, (x)i0,yi0) The target position information of the designated pixel point i in the preset display area in the original image to be displayed is]Is a rounded symbol.
Wherein the image coordinates (x)i1,yi1)、(xi1,yi2)、(xi2,yi1) And (x)i2,yi2) Are the coordinates in the image coordinate system of the original image to be displayed.
Since in the second formula, [ x ]i0]To obtain a value xiInteger part of 0, e.g. xi0 to 1.5, then xi1=[xi0]=[1.5]=1,[yi0]To obtain a value yiInteger part of 0, e.g. yi0-0.8, then yi1=[yi0]=[0.8]0; therefore, the image coordinates (x) calculated by the above-described second formulai1,yi1)、(xi1,yi2)、(xi2,yi1) And (x)i2,yi2) Are all integer coordinates, such that, in the original image to be intercepted, the image coordinates (x)i1,yi1)、(xi1,yi2)、(xi2,yi1) And (x)i2,yi2) The respectively indicated position points are all pixel points in the original image.
That is, in this specific implementation, the four determined pixel points are: and in the original image to be intercepted, the distance between the pixel points indicated by the target position information of the specified pixel points is the nearest, and the X-axis coordinate and the Y-axis coordinate in the image coordinate are both integer image coordinates corresponding to the pixel points. Therefore, according to the law of gradual change of the image, when the pixel values of the four pixel points are used for calculating the target pixel value of the appointed pixel point, the calculated target pixel value can be more attached to the image in the original image to be intercepted, so that the sub-image corresponding to the obtained display area is more attached to the original image to be intercepted, and the distortion degree of the sub-image is reduced.
Furthermore, according to this specific implementation manner, in step 2, determining the target pixel value of the designated pixel point by using the bilinear interpolation and the determined pixel values of the four pixel points may include the following steps:
determining a target pixel value of the designated pixel point by using a preset third formula; wherein the third formula is:
Figure BDA0002516679210000182
wherein, PiSetting a target pixel value of a designated pixel point i in a preset display area; qi11 is the image coordinate (x) in the original imagei1,yi1) The pixel value of the corresponding pixel point; qi12 is the image coordinate (x) in the original imagei1,yi2) The pixel value of the corresponding pixel point; qi21 is the image coordinate (x) in the original imagei2,yi1) The pixel value of the corresponding pixel point; qi22 is the image coordinate (x) in the original imagei2,yi2) The pixel value of the corresponding pixel point.
Further, R in the third formulai1 and Ri2 is obtained by bilinear interpolation, and the processing performance of the electronic device can be improved.
For example, as shown in fig. 7, a point P is a position point indicated by target position information (x0, y0) of a specified pixel point in a preset display area in the original image to be clipped, that is, an image coordinate of the point P in an image coordinate system of the original image to be clipped is (x0, y 0); wherein, according to the second formula, it can obtain:
Figure BDA0002516679210000191
that is, the electronic device may determine that, in the original image to be captured, the image coordinates of four pixel points whose positional relationship between the image coordinates and the target position information (x0, y0) satisfies the preset relationship are pixel points of (x1, y1), (x1, y2), (x2, y1), and (x2, y2), respectively;
further, according to the third formula, it can be obtained that:
Figure BDA0002516679210000192
that is, according to pixel values Q11, Q12, Q21, and Q22 of pixel points corresponding to image coordinates (x1, y1), (x1, y2), (x2, y1), and (x2, y2) in the original image to be captured, a target pixel value of a designated pixel point in the preset display area can be obtained by calculation.
Based on the above description of the image obtaining method provided by the embodiment of the present invention, a specific embodiment provided by the embodiment of the present invention may include the following steps:
step 21: determining an original image to be intercepted;
step 22: determining target position information of a designated pixel point in a display area in an original image by using the preset first formula;
step 23: determining four pixel points in the original image according to the determined target position information; wherein, the four pixel points are four vertexes of a rectangle containing the position point indicated by the target position information;
step 24: determining a target pixel value of a designated pixel point in the display area by utilizing the bilinear interpolation and the determined pixel values of the four pixel points;
step 25: obtaining a sub-image corresponding to the display area based on the target pixel value;
step 26: and rendering the display area by using the obtained sub-image, and displaying the sub-image of the display area.
In this embodiment, target position information of the designated pixel point in the display area in the original image is calculated in an incremental calculation manner through addition and subtraction operations of floating point numbers, and a target pixel value of the designated pixel point in the display area is determined by using a bilinear difference.
Therefore, under the condition of combining the incremental calculation and the bilinear difference, the subimages adaptive to each display screen can be obtained, and the time complexity is only related to the size of the original image to be intercepted and is not related to the number of the subimages to be obtained when the original image to be intercepted is subjected to multi-cutting to obtain a plurality of subimages adaptive to the display screens, so that the time complexity is small.
In addition, in this embodiment, obtaining the sub-image corresponding to the display area and displaying the sub-image are performed asynchronously, so that the operation of the whole process is more flow-based, and the karton phenomenon may not occur.
Corresponding to the image acquisition method provided by the embodiment of the invention, the embodiment of the invention also provides an image acquisition device.
Fig. 8 is an image obtaining method according to an embodiment of the present invention, and as shown in fig. 8, the apparatus may include the following modules:
an image determining module 810, configured to determine an original image to be intercepted;
a position information determining module 820, configured to determine, based on the calibration pixel and a preset inclination angle of the display area, target position information of a designated pixel in the display area in the original image; wherein, the display area is used for displaying a sub-image of the original image;
a pixel value determining module 830, configured to determine a target pixel value of the designated pixel point based on the target position information and a pixel value of a pixel point in the original image;
the image obtaining module 840 is configured to obtain a sub-image corresponding to the display area based on the target pixel value.
As can be seen from the above, by applying the scheme provided by the embodiment of the present invention, when determining the sub-image adapted to the display area, the target pixel value of the designated pixel point in the display area can be determined from the original image directly based on the calibration pixel point and the inclination angle of the display area, so as to obtain the sub-image to be displayed in the display area. Obviously, no matter how the display areas are arranged, as long as the inclination angles of the calibration pixel points and each display area are obtained, the target pixel values of the specified pixel points in the display areas can be determined from the original image, and the sub-images required to be displayed in the display areas can be obtained. Furthermore, when an image is displayed through a plurality of display areas which are arranged irregularly, the scheme provided by the embodiment of the invention can be utilized to enable the sub-images to be matched with the display areas.
Optionally, in a specific implementation manner, the number of the preset display areas is multiple; the image obtaining module 840 is specifically configured to:
obtaining sub-images corresponding to each display area based on the target pixel value of the designated pixel point in each display area, wherein the identification of each display area corresponds to the identification of the corresponding sub-image one by one;
the device further comprises:
and the image rendering module is used for rendering each display area according to the identifier of each sub-image and the identifier of each display area after the sub-image corresponding to the display area is obtained, and displaying the sub-image of each display area.
Optionally, in a specific implementation manner, the location information determining module 820 is specifically configured to:
determining the position variation of the designated pixel point in the image coordinate system of the original image compared with the calibrated pixel point according to the inclination angle and the difference value between the designated pixel point and the calibrated pixel point in the pixel coordinate system of the display area;
and determining the target position information of the designated pixel point in the original image according to the position information of the calibrated pixel point in the original image and the position variation.
Optionally, in a specific implementation manner, the pixel value determining module 830 includes:
the pixel point determining submodule is used for determining a plurality of pixel points in the original image, wherein the position relationship between the image coordinate and the target position information meets a preset relationship;
and the pixel value determining submodule is used for determining a target pixel value of the specified pixel point based on the determined pixel values of the plurality of pixel points.
Optionally, in a specific implementation manner, the pixel point determining submodule is specifically configured to:
determining four pixel points in the original image according to the target position information; wherein the four pixel points are four vertexes of a rectangle containing the position point indicated by the target position information;
the pixel value determination submodule is specifically configured to: and determining a target pixel value of the specified pixel point by utilizing the bilinear interpolation and the determined pixel values of the four pixel points.
An embodiment of the present invention further provides an electronic device, as shown in fig. 9, including a processor 901 and a memory 903;
a memory 903 for storing computer programs;
the processor 901 is configured to implement the steps of any one of the image acquisition methods provided in the embodiments of the present invention when executing the program stored in the memory 903.
Optionally, in a specific implementation manner, as shown in fig. 10, the electronic device may further include a communication interface 902 and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete communication with each other through the communication bus 904.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any one of the image acquisition methods provided in the embodiments of the present invention.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the steps of implementing any of the image acquisition methods provided by the embodiments of the present invention described above.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, apparatus embodiments, electronic device embodiments, computer-readable storage medium embodiments, and computer program product embodiments are substantially similar to method embodiments and therefore are described with relative ease, as appropriate, with reference to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. An image acquisition method, characterized in that the method comprises:
determining an original image to be intercepted;
determining target position information of designated pixel points in the display area in the original image based on the calibration pixel points and a preset inclination angle of the display area; wherein, the display area is used for displaying a sub-image of the original image;
determining a target pixel value of the designated pixel point based on the target position information and pixel values of pixel points in the original image;
and obtaining a sub-image corresponding to the display area based on the target pixel value.
2. The method according to claim 1, wherein the number of the preset display areas is multiple; the step of obtaining the sub-image corresponding to the display area based on the target pixel value includes:
obtaining sub-images corresponding to each display area based on the target pixel value of the designated pixel point in each display area, wherein the identification of each display area corresponds to the identification of the corresponding sub-image one by one;
after obtaining the sub-image corresponding to the presentation area, the method further includes:
and rendering each display area according to the identification of each sub-image and the identification of each display area, and displaying the sub-images of each display area.
3. The method according to claim 1, wherein the step of determining the target position information of the designated pixel point in the display area in the original image based on the calibration pixel point and a preset inclination angle of the display area comprises:
determining the position variation of the designated pixel point in the image coordinate system of the original image compared with the calibrated pixel point according to the inclination angle and the difference value between the designated pixel point and the calibrated pixel point in the pixel coordinate system of the display area;
and determining the target position information of the designated pixel point in the original image according to the position information of the calibrated pixel point in the original image and the position variation.
4. The method of claim 1, wherein the step of determining the target pixel value of the designated pixel point based on the target location information and the pixel values of the pixel points in the original image comprises:
determining a plurality of pixel points in the original image, wherein the position relationship between the image coordinates and the target position information meets a preset relationship;
and determining a target pixel value of the specified pixel point based on the determined pixel values of the plurality of pixel points.
5. The method according to claim 4, wherein the step of determining, in the original image, a plurality of pixel points whose positional relationship between image coordinates and the target position information satisfies a preset relationship includes:
determining four pixel points in the original image according to the target position information; wherein the four pixel points are four vertexes of a rectangle containing the position point indicated by the target position information;
the step of determining a target pixel value of the designated pixel point based on the determined pixel values of the plurality of pixel points includes:
and determining a target pixel value of the specified pixel point by utilizing the bilinear interpolation and the determined pixel values of the four pixel points.
6. An image acquisition apparatus, characterized in that the apparatus comprises:
the image determining module is used for determining an original image to be intercepted;
the position information determining module is used for determining target position information of a designated pixel point in the display area in the original image based on the calibration pixel point and a preset inclination angle of the display area; wherein, the display area is used for displaying a sub-image of the original image;
a pixel value determining module, configured to determine a target pixel value of the designated pixel point based on the target position information and a pixel value of a pixel point in the original image;
and the image acquisition module is used for obtaining the sub-image corresponding to the display area based on the target pixel value.
7. The device of claim 6, wherein the number of the preset display areas is multiple; the image acquisition module is specifically configured to:
obtaining sub-images corresponding to each display area based on the target pixel value of the designated pixel point in each display area, wherein the identification of each display area corresponds to the identification of the corresponding sub-image one by one;
the device further comprises:
and the image rendering module is used for rendering each display area according to the identifier of each sub-image and the identifier of each display area after the sub-image corresponding to the display area is obtained, and displaying the sub-image of each display area.
8. The apparatus of claim 6, wherein the location information determining module is specifically configured to:
determining the position variation of the designated pixel point in the image coordinate system of the original image compared with the calibrated pixel point according to the inclination angle and the difference value between the designated pixel point and the calibrated pixel point in the pixel coordinate system of the display area;
and determining the target position information of the designated pixel point in the original image according to the position information of the calibrated pixel point in the original image and the position variation.
9. The apparatus of claim 6, wherein the pixel value determining module comprises:
the pixel point determining submodule is used for determining a plurality of pixel points in the original image, wherein the position relationship between the image coordinate and the target position information meets a preset relationship;
and the pixel value determining submodule is used for determining a target pixel value of the specified pixel point based on the determined pixel values of the plurality of pixel points.
10. The apparatus according to claim 9, wherein the pixel point determination submodule is specifically configured to:
determining four pixel points in the original image according to the target position information; wherein the four pixel points are four vertexes of a rectangle containing the position point indicated by the target position information;
the pixel value determination submodule is specifically configured to: and determining a target pixel value of the specified pixel point by utilizing the bilinear interpolation and the determined pixel values of the four pixel points.
11. An electronic device comprising a processor and a memory;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
CN202010479019.4A 2020-05-29 2020-05-29 Image acquisition method and device and electronic equipment Pending CN111612838A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010479019.4A CN111612838A (en) 2020-05-29 2020-05-29 Image acquisition method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010479019.4A CN111612838A (en) 2020-05-29 2020-05-29 Image acquisition method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111612838A true CN111612838A (en) 2020-09-01

Family

ID=72205537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010479019.4A Pending CN111612838A (en) 2020-05-29 2020-05-29 Image acquisition method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111612838A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988101A (en) * 2021-04-20 2021-06-18 西安诺瓦星云科技股份有限公司 Image processing method and device, nonvolatile storage medium and processor
CN114510210A (en) * 2022-02-14 2022-05-17 惠州Tcl移动通信有限公司 Folding screen display method and device, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981794A (en) * 2012-12-12 2013-03-20 广东威创视讯科技股份有限公司 Powerpoint splicing display method
CN103826068A (en) * 2014-03-03 2014-05-28 南京航空航天大学 Video image rotation method
CN104281426A (en) * 2013-07-05 2015-01-14 浙江大华技术股份有限公司 Image display method and device
CN106055299A (en) * 2016-06-06 2016-10-26 北京小鸟科技股份有限公司 Method for realizing rotation of images in any angle on multiple display equipment
US20170318334A1 (en) * 2014-10-27 2017-11-02 Huawei Technologies Co., Ltd. Image Display Method, User Terminal, and Video Receiving Device
CN108922426A (en) * 2018-07-13 2018-11-30 深圳市东微智能科技股份有限公司 Mosaic screen combined method and mosaic screen combined system
CN110989949A (en) * 2019-11-13 2020-04-10 浙江大华技术股份有限公司 Method and device for special-shaped splicing display

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981794A (en) * 2012-12-12 2013-03-20 广东威创视讯科技股份有限公司 Powerpoint splicing display method
CN104281426A (en) * 2013-07-05 2015-01-14 浙江大华技术股份有限公司 Image display method and device
CN103826068A (en) * 2014-03-03 2014-05-28 南京航空航天大学 Video image rotation method
US20170318334A1 (en) * 2014-10-27 2017-11-02 Huawei Technologies Co., Ltd. Image Display Method, User Terminal, and Video Receiving Device
CN106055299A (en) * 2016-06-06 2016-10-26 北京小鸟科技股份有限公司 Method for realizing rotation of images in any angle on multiple display equipment
CN108922426A (en) * 2018-07-13 2018-11-30 深圳市东微智能科技股份有限公司 Mosaic screen combined method and mosaic screen combined system
CN110989949A (en) * 2019-11-13 2020-04-10 浙江大华技术股份有限公司 Method and device for special-shaped splicing display

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988101A (en) * 2021-04-20 2021-06-18 西安诺瓦星云科技股份有限公司 Image processing method and device, nonvolatile storage medium and processor
CN114510210A (en) * 2022-02-14 2022-05-17 惠州Tcl移动通信有限公司 Folding screen display method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US10789672B2 (en) Method and device for performing mapping on spherical panoramic image
US8818101B1 (en) Apparatus and method for feature matching in distorted images
CN108347657B (en) Method and device for displaying bullet screen information
JP2017130929A (en) Correction method and correction device for document image acquired by imaging apparatus
CN110781823B (en) Screen recording detection method and device, readable medium and electronic equipment
US20220328019A1 (en) Display terminal adjustment method and display terminal
CN112581632B (en) House source data processing method and device
CN105430331A (en) Method and device for adjusting display direction of monitor image
CN111612838A (en) Image acquisition method and device and electronic equipment
JP6486603B2 (en) Image processing device
CN113205024B (en) Engineering drawing preprocessing method and device, electronic equipment and storage medium
CN112927163A (en) Image data enhancement method and device, electronic equipment and storage medium
Askarian Bajestani et al. Scalable and view-independent calibration of multi-projector display for arbitrary uneven surfaces
CN115983304A (en) Two-dimensional code dynamic adjustment method and device, electronic equipment and storage medium
US20220270260A1 (en) Video segmentation method and apparatus, electronic device, and computer-readable storage medium
CN115619904A (en) Image processing method, device and equipment
CN110825989A (en) Picture display method and device, electronic equipment and readable medium
CN112017111B (en) Panorama synthesis method and device and electronic equipment
CN114356264A (en) Signal generation method, device, equipment and readable storage medium
AU2018203392B2 (en) Placemat: a ui for 2d/3d composition
CN113486941A (en) Live image training sample generation method, model training method and electronic equipment
CN111290676B (en) Method, device and equipment for intercepting picture of designated area in client
CN113763860B (en) Display color determining method, device, electronic equipment and storage medium
CN112583976B (en) Graphic code display method, equipment and readable storage medium
KR102434428B1 (en) Method of creating composite images, apparatus for creating composite images, and computer program for the method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination