CN114520893B - Picture projection method and device, projection equipment and readable storage medium - Google Patents

Picture projection method and device, projection equipment and readable storage medium Download PDF

Info

Publication number
CN114520893B
CN114520893B CN202011290215.3A CN202011290215A CN114520893B CN 114520893 B CN114520893 B CN 114520893B CN 202011290215 A CN202011290215 A CN 202011290215A CN 114520893 B CN114520893 B CN 114520893B
Authority
CN
China
Prior art keywords
curtain
projection
picture
candidate
line segment
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.)
Active
Application number
CN202011290215.3A
Other languages
Chinese (zh)
Other versions
CN114520893A (en
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.)
Chengdu Jimi Technology Co Ltd
Original Assignee
Chengdu Jimi 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 Chengdu Jimi Technology Co Ltd filed Critical Chengdu Jimi Technology Co Ltd
Priority to CN202011290215.3A priority Critical patent/CN114520893B/en
Publication of CN114520893A publication Critical patent/CN114520893A/en
Application granted granted Critical
Publication of CN114520893B publication Critical patent/CN114520893B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3179Video signal processing therefor
    • H04N9/3185Geometric adjustment, e.g. keystone or convergence
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3191Testing thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)
  • Projection Apparatus (AREA)

Abstract

The application provides a picture projection method, a picture projection device, projection equipment and a readable storage medium, and relates to the technical field of picture projection. This application is through acquireing the curtain image that the shooting equipment shot to the target curtain, and discern the effective curtain region in this curtain image, then according to projection equipment and shooting equipment use the target curtain as the projection position corresponding relation of consulting, will treat that the projection picture maps to in the projection region who corresponds with this effective curtain region, obtain the corresponding projection picture of treating, direct control projection equipment treats the projection picture and carries out the projection after that, make the picture content of treating the projection picture can be projected in the target curtain automatically and fast and show, thereby avoid the projection error that artifical debugging projection equipment caused, promote user's the experience of watching.

Description

Picture projection method and device, projection equipment and readable storage medium
Technical Field
The present application relates to the field of image projection technologies, and in particular, to an image projection method, an image projection apparatus, a projection device, and a readable storage medium.
Background
At present, in the actual use process of a projection device, a picture is often required to be projected onto a quadrilateral curtain for content display. Therefore, users often need to manually debug the projection device to correspondingly project the picture into the range of the curtain. The manual adjustment of the projection position usually causes projection errors due to manual operation, so that the picture cannot be really projected into the screen, and meanwhile, the picture cannot be rapidly projected on the screen, which affects the viewing experience of the user.
Disclosure of Invention
In view of the above, an object of the present application is to provide a picture projection method, a device, a projection apparatus, and a readable storage medium, which can automatically and quickly project a picture to be projected into a curtain area for display, thereby avoiding projection errors and improving the viewing experience of a user.
In order to achieve the above purpose, the embodiments of the present application employ the following technical solutions:
in a first aspect, an embodiment of the present application provides a picture projection method, where the method includes:
acquiring a curtain image shot by shooting equipment aiming at a target curtain;
carrying out curtain recognition on the curtain image, and determining an effective curtain area of the curtain image;
mapping a picture to be projected into a projection area corresponding to the effective curtain area according to the corner position of the effective curtain area in the curtain image and the projection position corresponding relation between projection equipment and shooting equipment to obtain a corresponding mapped picture to be projected;
and controlling the projection equipment to project the mapping picture to be projected so that the picture content of the picture to be projected is displayed in the target curtain.
In an optional embodiment, the performing curtain recognition on the curtain image and determining an effective curtain area of the curtain image includes:
carrying out line segment detection on the curtain image, and carrying out line segment direction clustering and line segment merging on the detected line segments to obtain a plurality of first candidate straight lines and a plurality of second candidate straight lines, wherein the first candidate straight lines are intersected with the second candidate straight lines;
selecting two first candidate straight lines with the largest distance between the adjacent first candidate straight lines from all the first candidate straight lines, and selecting two second candidate straight lines with the largest distance between the adjacent second candidate straight lines from all the second candidate straight lines to construct and form an initial curtain quadrangle;
optimizing the four side positions of the initial curtain quadrangle according to the respective line distribution positions of all the first candidate lines and all the second candidate lines to obtain an optimized quadrangle curtain area;
and taking the optimized quadrilateral curtain area as an effective curtain area of the curtain image.
In an optional embodiment, the performing line segment detection on the curtain image, and performing line segment direction clustering and line segment merging on the detected line segments to obtain a plurality of first candidate lines and a plurality of second candidate lines includes:
performing straight-line segment detection on the curtain image, and screening out a first straight-line segment and a second straight-line segment from all the detected straight-line segments, wherein the first straight-line segment is a straight-line segment with the direction deviation degree relative to a first direction smaller than a first deviation degree threshold value, the second straight-line segment is a straight-line segment with the direction deviation degree relative to a second direction smaller than a second deviation degree threshold value, and the first direction is perpendicular to the second direction;
and performing line segment direction clustering and line segment merging on all the screened first straight lines to obtain first candidate straight lines of which the lengths of the corresponding merged line segments are not less than a first length threshold, and performing line segment direction clustering and line segment merging on all the screened second straight lines to obtain second candidate straight lines of which the lengths of the corresponding merged line segments are not less than a second length threshold.
In an optional embodiment, the optimizing the four-side positions of the initial curtain quadrangle according to the respective line distribution positions of all the first candidate lines and all the second candidate lines includes:
judging whether an angular point of the initial curtain quadrangle exists on a candidate straight line where each initial side of the initial curtain quadrangle is located or not;
when the angular point exists on the candidate straight line where the initial edge is located, selecting a target candidate straight line adjacent to the initial edge along the direction far away from the opposite edge corresponding to the initial edge, replacing and resetting the initial edge based on the selected target candidate straight line, and repeating the judging steps until the angular point does not exist on the candidate straight line where the initial edge is located.
In an optional embodiment, the mapping a to-be-projected picture to a projection area corresponding to the effective curtain area according to a correspondence between corner positions of the effective curtain area in the curtain image and projection positions of the projection device and the shooting device to obtain a corresponding to-be-projected mapped picture includes:
carrying out position transformation on the corner position of the effective curtain area according to the shooting position corresponding relation to obtain corner mapping coordinates corresponding to the corner position of the effective curtain area in a projection coordinate system of the projection equipment;
establishing a coordinate incidence relation between the corner point mapping coordinate in the projection coordinate system and the vertex coordinate of the picture to be projected;
and performing coordinate mapping on each pixel point in the picture to be projected according to the coordinate incidence relation to obtain the picture to be projected and mapped.
In an alternative embodiment, the method further comprises:
controlling the projection equipment to project a calibration picture to a target curtain and acquiring a curtain calibration image shot by the shooting equipment aiming at the calibration picture;
calculating a first corner coordinate of the calibration picture under a projection coordinate system where the projection equipment is located, and a second corner coordinate of the calibration picture under a shooting coordinate system corresponding to the curtain calibration image;
and determining the corresponding relation of the shooting position between the projection equipment and the shooting equipment according to the corresponding relation between the first corner point coordinate and the second corner point coordinate.
In a second aspect, an embodiment of the present application provides a picture projection apparatus, including:
the curtain image acquisition module is used for acquiring a curtain image shot by the shooting equipment aiming at a target curtain;
the curtain area identification module is used for carrying out curtain identification on the curtain image and determining an effective curtain area of the curtain image;
the picture mapping processing module is used for mapping the picture to be projected into the projection area corresponding to the effective curtain area according to the corner position of the effective curtain area in the curtain image and the corresponding relation of projection positions between the projection equipment and the shooting equipment to obtain the corresponding picture to be projected;
and the mapping picture projection module is used for controlling the projection equipment to project the mapping picture to be projected so that the picture content of the picture to be projected is displayed in the target curtain.
In an alternative embodiment, the curtain region identifying module includes:
the candidate straight line extraction submodule is used for carrying out straight line segment detection on the curtain image, and carrying out line segment direction clustering and line segment merging on the detected straight line segments to obtain a plurality of first candidate straight lines and a plurality of second candidate straight lines, wherein the first candidate straight lines are intersected with the second candidate straight lines;
the quadrangle construction submodule is used for selecting two first candidate straight lines with the largest distance between the adjacent first candidate straight lines from all the first candidate straight lines, selecting two second candidate straight lines with the largest distance between the adjacent second candidate straight lines from all the second candidate straight lines, and constructing and forming an initial curtain quadrangle;
the quadrangle optimization submodule is used for optimizing the positions of four edges of the initial curtain quadrangle according to the respective straight line distribution positions of all the first candidate straight lines and all the second candidate straight lines to obtain an optimized quadrangle curtain area;
and the curtain area determining submodule is used for taking the optimized quadrilateral curtain area as an effective curtain area of the curtain image.
In an optional embodiment, the candidate straight line extraction sub-module performs straight line segment detection on the curtain image, and performs line segment direction clustering and line segment merging on the detected straight line segments to obtain a plurality of first candidate straight lines and a plurality of second candidate straight lines, including:
performing straight-line segment detection on the curtain image, and screening out a first straight-line segment and a second straight-line segment from all the detected straight-line segments, wherein the first straight-line segment is a straight-line segment with the direction deviation degree relative to a first direction smaller than a first deviation degree threshold value, the second straight-line segment is a straight-line segment with the direction deviation degree relative to a second direction smaller than a second deviation degree threshold value, and the first direction is perpendicular to the second direction;
and performing line segment direction clustering and line segment merging on all the screened first straight lines to obtain first candidate straight lines of which the lengths of the corresponding merged line segments are not less than a first length threshold, and performing line segment direction clustering and line segment merging on all the screened second straight lines to obtain second candidate straight lines of which the lengths of the corresponding merged line segments are not less than a second length threshold.
In an optional embodiment, the method for optimizing the four-side positions of the initial curtain quadrangle by the quadrangle optimization submodule according to the respective line distribution positions of all the first candidate lines and all the second candidate lines includes:
judging whether an angular point of the initial curtain quadrangle exists on a candidate straight line where each initial side of the initial curtain quadrangle is located or not;
when the angular point exists on the candidate straight line where the initial edge is located, selecting a target candidate straight line adjacent to the initial edge along the direction far away from the opposite edge corresponding to the initial edge, replacing and resetting the initial edge based on the selected target candidate straight line, and repeating the judging steps until the angular point does not exist on the candidate straight line where the initial edge is located.
In an optional embodiment, the mapping processing module maps the to-be-projected picture into the projection area corresponding to the effective curtain area according to the corner position of the effective curtain area in the curtain image and the projection position corresponding relationship between the projection device and the shooting device, so as to obtain a corresponding to-be-projected mapping picture, including:
carrying out position transformation on the corner point position of the effective curtain region according to the shooting position corresponding relation to obtain a corresponding corner point mapping coordinate of the corner point position of the effective curtain region under a projection coordinate system of the projection equipment;
establishing a coordinate incidence relation between the corner point mapping coordinate in the projection coordinate system and the vertex coordinate of the picture to be projected;
and carrying out coordinate mapping on each pixel point in the picture to be projected according to the coordinate incidence relation to obtain the picture to be projected.
In an alternative embodiment, the apparatus further comprises:
the screen projection calibration module is used for controlling the projection equipment to project a calibration picture to a target screen and acquiring a screen calibration image shot by the shooting equipment aiming at the calibration picture;
the corner coordinate calculation module is used for calculating a first corner coordinate of the calibration picture under a projection coordinate system where the projection equipment is located and a second corner coordinate of the calibration picture under a shooting coordinate system corresponding to the curtain calibration image;
and the position relation creating module is used for determining the corresponding relation of the shooting positions between the projection equipment and the shooting equipment according to the corresponding relation between the first corner point coordinate and the second corner point coordinate.
In a third aspect, an embodiment of the present application provides a projection device, which includes a processor and a memory, where the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the picture projection method described in any one of the foregoing embodiments.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the picture projection method described in any one of the foregoing embodiments.
The beneficial effects of the embodiment of the application are that:
this application is through acquireing the curtain image that the shooting equipment shot to the target curtain, and discern the effective curtain region in this curtain image, then according to projection equipment and shooting equipment use the target curtain as the projection position corresponding relation of consulting, will treat that the projection picture maps to in the projection region who corresponds with this effective curtain region, obtain the corresponding projection picture of treating, direct control projection equipment treats the projection picture and carries out the projection after that, make the picture content of treating the projection picture can be projected in the target curtain automatically and fast and show, thereby avoid the projection error that artifical debugging projection equipment caused, promote user's the experience of watching.
In order to make the aforementioned objects, features and advantages of the present application comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic flowchart of a picture projection method according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating the sub-steps included in step S220 of FIG. 1;
FIG. 3 is a schematic flow chart of the sub-steps included in sub-step S223 of FIG. 2;
FIG. 4 is a flowchart illustrating the sub-steps included in step S230 of FIG. 1;
fig. 5 is a second flowchart of a picture projection method according to an embodiment of the present application;
fig. 6 is a schematic diagram illustrating a composition of a picture projection apparatus according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a curtain area recognition module shown in FIG. 6;
fig. 8 is a second schematic view illustrating a composition of a picture projection apparatus according to an embodiment of the present application;
fig. 9 is a schematic composition diagram of a projection apparatus according to an embodiment of the present application.
Icon: 100-picture projection means; 110-curtain image acquisition module; 120-curtain area identification module; 130-picture mapping processing module; 140-a map projection module; 121-candidate straight line extraction submodule; 122-quadrilateral building submodule; 123-quadrilateral optimization submodule; 124-curtain area determination submodule; 150-curtain projection calibration module; 160-corner coordinate calculation module; 170-a location relationship creation module; 10-a projection device; 11-a memory; 12-a processor; 13-a communication unit; 14-a photographing device.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, as presented in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. 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 application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present application, it is to be understood that relational terms such as the terms first and second, and the like, are 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 a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic flow chart of a picture projection method according to an embodiment of the present disclosure. In the embodiment of the application, the image projection method shown in fig. 1 can automatically and quickly project the image to be projected into the curtain area for display, so that projection errors caused by manual debugging of projection equipment are avoided, and the viewing experience of a user is improved. The screen projection method shown in fig. 1 may be executed by a computer device connected to the projection device and the photographing device in a communication manner, may be executed by a projection device directly connected to the photographing device in a communication manner, or may be executed by a projection device integrated with the photographing device alone. The screen projection method shown in fig. 1 is described in detail below.
Step S210, acquiring a curtain image shot by the shooting device for the target curtain.
In this embodiment, when a target curtain to be projected is determined, a pure white image may be projected to the target curtain through a projection device or other light and shadow projection devices, and then the target curtain is subjected to image acquisition by a shooting device, so as to obtain a curtain image corresponding to the target curtain. In this process, in order to improve the projection accuracy of the image projection method shown in fig. 1, the brightness of the projected pure white image needs to be higher than 20% of the maximum projection brightness of the projection apparatus, so as to ensure that the curtain characteristics contained in the collected curtain image are richer and finer.
After the shooting device shoots the curtain image, the electronic device executing the picture projection method shown in fig. 1 can acquire the curtain image from the shooting device through a network.
Step S220, performing curtain recognition on the curtain image, and determining an effective curtain area of the curtain image.
In this embodiment, the effective curtain area corresponding to the real curtain in the curtain image can be determined by performing feature recognition on the image features of the curtain image.
And step S230, mapping the picture to be projected into a projection area corresponding to the effective curtain area according to the corner position of the effective curtain area in the curtain image, the projection position corresponding relation between the projection equipment and the shooting equipment and the corner position of the effective curtain area in the curtain image, so as to obtain the corresponding mapping picture to be projected.
In this embodiment, the shooting position correspondence relationship is used to indicate a correspondence relationship between positions of the same object in the projection screen and the shot image when the projection device and the shooting device are referenced to the target curtain. In other words, when the positions of the projection device and the shooting device relative to the target curtain do not change, the projection device projects a picture including a certain object onto the target curtain, and when the shooting device shoots the picture including the object toward the target curtain, a position correspondence between position information of the object in a projection coordinate system where the projection device is located and position information of the object in a shooting coordinate system where the shooting device is located is the shooting position correspondence. At this time, the projection area is an area corresponding to the effective curtain area in the projection coordinate system where the projection device is located. The specific position information of the projection area can be obtained by converting the corresponding relation of the projection positions of the relevant position information of the effective curtain area in the curtain image.
After the corner position of the projection area corresponding to the effective curtain area is determined through the corner position of the effective curtain area in the curtain image, the whole to-be-projected picture can be aligned to the range of the projection area in a coordinate mapping mode to obtain a corresponding to-be-projected mapping picture, so that when the projection equipment directly faces the target curtain to project the to-be-projected mapping picture, the picture content of the to-be-projected picture can be really and effectively displayed on the target curtain.
And step S240, controlling the projection equipment to project the mapping picture to be projected, so that the picture content of the picture to be projected is displayed in the target curtain.
In this embodiment, when the picture content of the picture to be projected is aligned to the projection area corresponding to the effective curtain area in the projection coordinate system in the picture mapping manner, the projection device may be directly controlled to project the obtained picture to be projected, so that the picture to be projected is correspondingly projected to the real curtain area on the target curtain, thereby ensuring that the picture content of the picture to be projected is displayed in the target curtain, and the projection device does not need to be manually debugged to align with the real curtain area for picture projection, thereby avoiding a projection error caused by manually debugging the projection device, improving picture projection efficiency, and improving the viewing experience of a user.
Therefore, by executing the picture projection method shown in fig. 1, the projection device can automatically and quickly project the picture to be projected into the curtain area for display, thereby avoiding projection errors caused by manual debugging of the projection device and improving the viewing experience of the user.
In the application, the identification accuracy of the effective curtain region in the curtain image is an important factor influencing the projection effect of the picture projection method, so that the curtain identification method capable of improving the curtain identification accuracy is provided in the embodiment of the application, and the projection equipment can effectively project the picture content of the picture to be projected into the real curtain region. The curtain recognition method will be described in detail below.
Referring to fig. 2, fig. 2 is a flowchart illustrating sub-steps included in step S220 in fig. 1. In this embodiment, the step S220 may include a substep S221 to a substep S225.
And a substep S221 of performing line segment detection on the curtain image, and performing line segment direction clustering and line segment merging on the detected line segments to obtain a plurality of first candidate lines and a plurality of second candidate lines.
In this embodiment, all the Line segments may be extracted from the curtain image by using any one of Line Segment extraction algorithms such as hough transform (HoughLines) algorithm, line Segment Detector (LSD) algorithm, and Line feature edge detection (EDlines) algorithm. The first candidate straight line and the second candidate straight line are intersected, the straight line extending direction of the first candidate straight line approaches to a first direction, the straight line extending direction of the second candidate straight line approaches to a second direction, and the first direction and the second direction are perpendicular to each other, and the first direction and the second direction are respectively one of the horizontal direction and the vertical direction of the curtain image. In an implementation manner of this embodiment, the first direction is a horizontal direction of the curtain image, and the second direction is a vertical direction of the curtain image.
In this process, in order to improve the extraction efficiency of the candidate straight lines and avoid performing unnecessary candidate straight line extraction operations, the step S221 may include:
carrying out straight line segment detection on the curtain image, and screening out a first straight line segment and a second straight line segment from all detected straight line segments;
and performing line segment direction clustering and line segment merging on all the screened first straight lines to obtain first candidate straight lines of which the lengths of the corresponding merged line segments are not less than a first length threshold, and performing line segment direction clustering and line segment merging on all the screened second straight lines to obtain second candidate straight lines of which the lengths of the corresponding merged line segments are not less than a second length threshold.
The first straight line segment is a straight line segment with a direction deviation degree relative to a first direction smaller than a first deviation degree threshold value, and the second straight line segment is a straight line segment with a direction deviation degree relative to a second direction smaller than a second deviation degree threshold value. The first deviation threshold may be 20 °, 15 ° or 25 °, and the value thereof may be configured differently according to the curtain identification accuracy requirement. Similarly, the second deviation threshold may be 20 °, 15 ° or 25 °, and the value thereof may be configured differently according to the curtain identification accuracy requirement.
After all the first straight line segments and all the second straight line segments in the curtain image are screened out, directional clustering is conducted on all the screened first straight line segments, the first straight line segments with the consistent directions are subjected to line segment merging according to a clustering result, and then the straight line segments with the lengths not smaller than a first length threshold value are used as first candidate straight lines which are possibly related to an effective curtain area in the curtain image. Meanwhile, direction clustering is carried out on all the screened second straight-line segments, the second straight-line segments with the same direction are subjected to line segment merging according to a clustering result, and then the straight-line segments with the merged line segment length not smaller than a second length threshold are used as second candidate straight lines possibly related to the effective curtain area in the curtain image.
Wherein the specific size of the first length threshold and the second length threshold is associated with the real length-width dimension of the target curtain. If the first direction corresponds to the length direction of the target curtain and the second direction corresponds to the width direction of the target curtain, the first length threshold is greater than the second length threshold; if the first direction corresponds to the width direction of the target curtain and the second direction corresponds to the length direction of the target curtain, the second length threshold is greater than the first length threshold.
In the sub-step S222, two first candidate straight lines with the largest distance between adjacent first candidate straight lines are selected from all the first candidate straight lines, and two second candidate straight lines with the largest distance between adjacent second candidate straight lines are selected from all the second candidate straight lines, so as to construct and form an initial curtain quadrangle.
In this embodiment, after all the first candidate straight lines and all the second candidate straight lines included in the curtain image are determined, the straight line distance between two adjacent first candidate straight lines in the curtain image is calculated according to the distribution position of each first candidate straight line in the curtain image, and finally two first candidate straight lines with the largest distance between the adjacent first candidate straight lines are selected. Meanwhile, the linear distance between two adjacent second candidate straight lines in the curtain image is calculated according to the distribution position of each second candidate straight line in the curtain image, and finally two second candidate straight lines with the largest distance between the two adjacent second candidate straight lines are selected. And finally, after two first candidate straight lines and two second candidate straight lines with the largest distance between the two adjacent first candidate straight lines and the two second candidate straight lines are selected, calculating straight line intersection points of the four candidate straight lines based on the two selected first candidate straight lines and the two selected second candidate straight lines, and obtaining an initial curtain quadrangle. At this time, each initial edge of the initial curtain quadrangle corresponds to a first candidate straight line or a second candidate straight line.
And a substep S223 of optimizing the four-side positions of the initial curtain quadrangle according to the respective straight line distribution positions of all the first candidate straight lines and all the second candidate straight lines to obtain an optimized quadrangle curtain area.
In this embodiment, an initial curtain quadrangle correspondingly constructed by only two first candidate straight lines and two second candidate straight lines with the largest distance between adjacent lines is selected, and cannot directly represent an effective curtain area in the curtain image, and a suitable candidate straight line is selected for each edge of the initial curtain quadrangle to reconstruct by optimizing the position of each edge of the initial curtain quadrangle until all the finally obtained edges of the curtain quadrangle can meet the constraint condition of the effective curtain area, at this time, the optimization operation on the positions of the four edges of the initial curtain quadrangle is completed, and the optimized quadrangle curtain area is obtained. And the constraint condition of the effective curtain area is that the positions of all the corner points of the corresponding curtain quadrangle are not positioned on the side extension line of the curtain quadrangle.
Optionally, referring to fig. 3, fig. 3 is a schematic flowchart of the sub-steps included in the sub-step S223 in fig. 2. In an implementation manner of this embodiment, the step of optimizing the positions of the four sides of the initial curtain quadrangle according to the line distribution positions of all the first candidate lines and all the second candidate lines in the sub-step S223 may include sub-steps S2231 and S2232.
In the sub-step S2231, for each initial edge of the initial curtain quadrangle, it is determined whether an angular point of the initial curtain quadrangle exists on the candidate straight line where the initial edge is located.
In this embodiment, after the initial curtain quadrangle is constructed, the four corner positions of the initial curtain quadrangle are calculated, and it is determined whether the four corner positions are located on the first candidate straight line or the second candidate straight line where each initial edge of the initial curtain quadrangle is located. If one or two angular points exist on a first candidate straight line or a second candidate straight line where an initial edge of the initial curtain quadrangle is located, it is indicated that the position of the initial edge needs to be optimized, another first candidate straight line or another second candidate straight line needs to be selected to reset the initial edge, and at this moment, sub-step S2232 is correspondingly executed; if any angular point does not exist on the first candidate straight line or the second candidate straight line where a certain initial edge of the initial curtain quadrangle is located, it is indicated that the position of the initial edge can meet the constraint condition of the effective curtain area, and the initial edge does not need to be optimized.
In the sub-step S2232, a target candidate straight line adjacent to the initial edge is selected in a direction away from an opposite edge corresponding to the initial edge, and the initial edge is replaced and reset based on the selected target candidate straight line.
In this embodiment, when it is determined that an initial edge of the initial curtain quadrangle needs to be optimized, a target candidate straight line adjacent to the candidate straight line where the initial edge is located needs to be selected along a direction away from a corresponding edge corresponding to the initial edge to replace and reconstruct the initial edge, so as to obtain a new initial curtain quadrangle, and then the above sub-step S2231 is repeatedly performed to verify whether the obtained entire initial curtain quadrangle meets the constraint condition of the effective curtain area.
The sub-step S2231 and the sub-step S2232 are explained below as examples. Assuming that a first candidate straight line a, a first candidate straight line B, a first candidate straight line C, a first candidate straight line D, a first candidate straight line E, a first candidate straight line F and a first candidate straight line G are sequentially arranged in a certain curtain image, and a second candidate straight line a, a second candidate straight line B, a second candidate straight line C, a second candidate straight line D, a second candidate straight line E, a second candidate straight line F and a second candidate straight line G are also sequentially arranged in the curtain image, wherein the straight line distance between the first candidate straight line C and the first candidate straight line D is the largest, and the straight line distance between the second candidate straight line C and the second candidate straight line D is the largest, the four initial edges of the initial curtain quadrangle which is initially constructed are formed by intersecting the first candidate straight line C, the first candidate straight line D, the second candidate straight line C and the second candidate straight line D.
At this time, the initial edge 1 of the initial curtain quadrangle is located on the first candidate straight line C, the initial edge 2 is located on the second candidate straight line C, the initial edge 3 is located on the first candidate straight line D, the initial edge 4 is located on the second candidate straight line D, the initial edge 1 and the initial edge 3 form opposite edges, and the initial edge 2 and the initial edge 4 form opposite edges. Therefore, when the initial curtain quadrangle is required to be optimized, whether the four corner points of the initial curtain quadrangle are located on the respective extension lines of the four initial edges is judged. If an angular point exists on the first candidate straight line D corresponding to the initial edge 3, another first candidate straight line F needs to be selected along a direction far from the initial edge 1 for the initial edge 3 to replace the first candidate straight line D of the initial edge 3 currently constructed by the initial curtain quadrangle, so as to obtain an initial curtain quadrangle of which the initial edge 3 is located on the first candidate straight line F, and then whether the angular point of the initial curtain quadrangle exists on the first candidate straight line F where the initial edge 3 of the obtained initial curtain quadrangle is located is judged again until any angular point does not exist on the first candidate straight line where the initial edge 3 is located.
Therefore, when the corner points of the initial curtain quadrangle do not exist on the respective extension lines of the four initial edges of the finally constructed initial curtain quadrangle, the finally obtained initial curtain quadrangle is represented as the optimized quadrangle curtain area in the curtain image.
In the substep S224, the optimized quadrangular curtain region is used as an effective curtain region of the curtain image.
In this embodiment, when the optimization operation on the initial curtain quadrangle is completed to obtain the optimized quadrangle curtain region, the optimized quadrangle curtain region can be directly used as the effective curtain region of the curtain image.
Therefore, by performing the substeps 221-224, the screen recognition accuracy is improved, so that the projection apparatus can effectively project the image content of the image to be projected into the real screen area.
In the present application, an embodiment of the present application provides a picture mapping method, which ensures that a picture finally projected by the projection device substantially corresponds to an effective curtain area, so as to realize an automatic adjustment operation of projection of the projection device, and avoid a projection error. The following describes the screen mapping method in detail.
Referring to fig. 4, fig. 4 is a flowchart illustrating sub-steps included in step S230 in fig. 1. In this embodiment, the step S230 may include sub-steps S231 to S233.
And a substep S231 of performing position transformation on the corner position of the effective curtain region according to the projection position corresponding relation to obtain the corner mapping coordinate corresponding to the corner position of the effective curtain region in the projection coordinate system of the projection equipment.
And a substep S232 of establishing a coordinate incidence relation between the corner point mapping coordinates in the projection coordinate system and the vertex coordinates of the picture to be projected.
And a substep S233, performing coordinate mapping on each pixel point in the picture to be projected according to the coordinate association relation to obtain the picture to be projected and mapped.
And the coordinate incidence relation is used for representing a position mapping relation between a projection area corresponding to the effective curtain area in the layer where the projection coordinate system is located and the picture outline area of the picture to be projected.
Therefore, by executing the substeps 231-233, the method can effectively align the picture content of the picture to be projected to the projection area matched with the effective curtain area, thereby realizing the projection automatic adjustment operation of the projection equipment and avoiding the projection error.
Optionally, referring to fig. 5, fig. 5 is a second flowchart of the image projection method according to the embodiment of the present application. In the embodiment of the present application, compared with the screen projection method shown in fig. 1, the screen projection method shown in fig. 5 further includes step S207, step S208, and step S209. The step S207, the step S208 and the step S209 are used for accurately measuring the projection position corresponding relationship between the projection device and the shooting device, which are referenced by the target curtain, when the respective positions of the projection device and the shooting device relative to the target curtain are not changed, so that the projection device can normally project the picture to be projected into the real curtain area of the target curtain, and the user experience is improved. When the position of the projection device and/or the shooting device relative to the target curtain changes, the steps S207, S208, and S209 need to be executed again to perform parameter calibration on the shooting position corresponding relationship.
And step S207, controlling the projection equipment to project the calibration picture to the target curtain and acquiring a curtain calibration image shot by the shooting equipment aiming at the calibration picture.
In this embodiment, the calibration picture may be a black-and-white checkerboard picture or a black-and-white stripe picture, and the specific picture content may be configured differently according to the user requirement.
Step S208, calculating a first corner coordinate of the calibration picture in a projection coordinate system of the projection equipment and a second corner coordinate of the calibration picture in a shooting coordinate system corresponding to the curtain calibration image.
Step S209, determining the corresponding relation of the shooting position between the projection equipment and the shooting equipment according to the corresponding relation between the first corner point coordinate and the second corner point coordinate.
The corresponding relation between the first corner point coordinate and the second corner point coordinate can be directly used as the corresponding relation of the shooting position.
Therefore, by executing the steps S207, S208 and S209, when the positions of the projection device and the shooting device relative to the target curtain are not changed, the projection device and the shooting device that use the target curtain as a reference are accurately measured to obtain the corresponding relationship of the shooting positions, and when the positions of the projection device and/or the shooting device relative to the target curtain are changed, the corresponding relationship of the shooting positions is synchronously calibrated, so that the projection device can finally and normally project the picture to be projected into the real curtain area of the target curtain, and the user experience is improved.
In the present application, embodiments of the present application provide a screen projection apparatus, which enables an electronic device in which the screen projection apparatus is stored or solidified to realize functions corresponding to the screen projection method by running a software function module, a computer program, and the like included in the screen projection apparatus. The following describes a specific composition of the screen projection apparatus provided in the present application.
Optionally, referring to fig. 6, fig. 6 is a schematic view illustrating a composition of the image projection apparatus 100 according to an embodiment of the present disclosure. In the embodiment of the present application, the screen projection apparatus 100 may include a screen image obtaining module 110, a screen area identifying module 120, a screen mapping processing module 130, and a mapping screen projection module 140.
The curtain image obtaining module 110 is configured to obtain a curtain image captured by the capturing device for a target curtain.
The curtain area identifying module 120 is configured to perform curtain identification on the curtain image, and determine an effective curtain area of the curtain image.
The image mapping processing module 130 is configured to map the image to be projected into the projection area corresponding to the effective curtain area according to the corner position of the effective curtain area in the curtain image and the projection position corresponding relationship between the projection device and the shooting device, so as to obtain a corresponding image to be projected.
The mapping image projection module 140 is configured to control the projection device to project the mapping image to be projected, so that the image content of the mapping image to be projected is displayed in the target curtain.
Optionally, referring to fig. 7, fig. 7 is a schematic diagram illustrating a composition of the curtain area identifying module 120 in fig. 6. In this embodiment, the curtain area identifying module 120 includes a candidate straight line extracting sub-module 121, a quadrilateral constructing sub-module 122, a quadrilateral optimizing sub-module 123, and a curtain area determining sub-module 124.
The candidate straight line extraction submodule 121 is configured to perform straight line segment detection on the curtain image, perform line segment direction clustering and line segment merging on the detected straight line segments, and obtain a plurality of first candidate straight lines and a plurality of second candidate straight lines, where the first candidate straight lines intersect with the second candidate straight lines.
And the quadrangle construction submodule 122 is configured to select two first candidate straight lines with the largest distance between adjacent first candidate straight lines from all the first candidate straight lines, and select two second candidate straight lines with the largest distance between adjacent second candidate straight lines from all the second candidate straight lines, so as to construct and form an initial curtain quadrangle.
And the quadrangle optimization submodule 123 is configured to optimize four edge positions of the initial curtain quadrangle according to respective line distribution positions of all the first candidate lines and all the second candidate lines, so as to obtain an optimized quadrangle curtain area.
And the curtain area determining submodule 124 is used for taking the optimized quadrilateral curtain area as an effective curtain area of the curtain image.
The candidate straight line extraction submodule 121 performs straight line segment detection on the curtain image, performs line segment direction clustering and line segment merging on the detected straight line segments, and obtains a plurality of first candidate straight lines and a plurality of second candidate straight lines, including:
performing straight-line segment detection on the curtain image, and screening out a first straight-line segment and a second straight-line segment from all the detected straight-line segments, wherein the first straight-line segment is a straight-line segment with the direction deviation degree relative to a first direction smaller than a first deviation degree threshold value, the second straight-line segment is a straight-line segment with the direction deviation degree relative to a second direction smaller than a second deviation degree threshold value, and the first direction is perpendicular to the second direction;
and performing line segment direction clustering and line segment merging on all the screened first straight lines to obtain first candidate straight lines of which the lengths of the corresponding merged line segments are not less than a first length threshold, and performing line segment direction clustering and line segment merging on all the screened second straight lines to obtain second candidate straight lines of which the lengths of the corresponding merged line segments are not less than a second length threshold.
The method for optimizing the four-side positions of the initial curtain quadrangle by the quadrangle optimization submodule 123 according to the respective line distribution positions of all the first candidate lines and all the second candidate lines includes:
judging whether an angular point of the initial curtain quadrangle exists on a candidate straight line where each initial side of the initial curtain quadrangle is located or not;
when the angular point exists on the candidate straight line where the initial edge is located, selecting a target candidate straight line adjacent to the initial edge along the direction far away from the opposite edge corresponding to the initial edge, replacing and resetting the initial edge based on the selected target candidate straight line, and repeating the judging steps until the angular point does not exist on the candidate straight line where the initial edge is located.
In this embodiment, the image mapping processing module 130 maps the image to be projected into the projection area corresponding to the effective curtain area according to the corner position of the effective curtain area in the curtain image and the projection position corresponding relationship between the projection device and the shooting device, so as to obtain a corresponding image to be projected, which includes:
carrying out position transformation on the corner position of the effective curtain area according to the shooting position corresponding relation to obtain corner mapping coordinates corresponding to the corner position of the effective curtain area in a projection coordinate system of the projection equipment;
establishing a coordinate incidence relation between the corner point mapping coordinate in the projection coordinate system and the vertex coordinate of the picture to be projected;
and performing coordinate mapping on each pixel point in the picture to be projected according to the coordinate incidence relation to obtain the picture to be projected and mapped.
Optionally, referring to fig. 8, fig. 8 is a second schematic view illustrating a composition of the image projection apparatus 100 according to the embodiment of the present disclosure. In the embodiment of the present application, the image projection apparatus 100 may further include a curtain projection calibration module 150, a corner coordinate calculation module 160, and a position relationship creation module 170.
And a curtain projection calibration module 150, configured to control the projection device to project a calibration picture onto the target curtain and obtain a curtain calibration image captured by the capture device for the calibration picture.
The corner coordinate calculation module 160 is configured to calculate a first corner coordinate of the calibration frame in the projection coordinate system where the projection apparatus is located, and a second corner coordinate of the calibration frame in the shooting coordinate system corresponding to the curtain calibration image.
The position relationship creating module 170 is configured to determine a projection position corresponding relationship between the projection device and the shooting device according to a corresponding relationship between the first corner coordinate and the second corner coordinate.
It should be noted that the basic principle and the technical effects of the image projection apparatus 100 provided in the embodiment of the present application are the same as those of the image projection method described above, and for the sake of brief description, reference may be made to the description of the image projection method described above for parts that are not mentioned in this embodiment.
In the present application, embodiments of the present application provide a projection apparatus storing or curing the image projection apparatus 100, which can implement functions corresponding to the image projection method by running software function modules and computer programs included in the image projection apparatus 100. The following describes specific components of the projection apparatus provided in the present application.
Referring to fig. 9, fig. 9 is a schematic composition diagram of a projection apparatus 10 according to an embodiment of the present disclosure. In this embodiment of the application, the projection apparatus 10 can be used to perform image projection, and automatically and rapidly project the image to be projected into the curtain area for display, thereby avoiding the occurrence of projection errors and improving the viewing experience of the user.
The projection device 10 may include a memory 11, a processor 12, a communication unit 13, a shooting device 14, and the image projection apparatus 100. The memory 11, the processor 12, the communication unit 13 and the shooting device 14 are electrically connected to each other indirectly or indirectly to realize data transmission or interaction. For example, the memory 11, the processor 12, the communication unit 13 and the shooting device 14 may be electrically connected to each other through one or more communication buses or signal lines.
In this embodiment, the Memory 11 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 11 is used for storing a program, and the processor 12 can execute the program accordingly after receiving the execution instruction.
In this embodiment, the processor 12 may be an integrated circuit chip having signal processing capabilities. The Processor 12 may be a general-purpose Processor including at least one of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a Network Processor (NP). The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that implements or executes the methods, steps and logic blocks disclosed in the embodiments of the present application.
In this embodiment, the communication unit 13 is configured to establish a communication connection between the projection device 10 and other electronic devices through a network, and to send and receive data through the network, where the network includes a wired communication network and a wireless communication network.
In this embodiment, the shooting device 14 includes a camera, and the shooting device 14 performs image acquisition on the picture projected by the projection device 10 through the camera.
In this embodiment, the image projection apparatus 100 includes at least one software functional module capable of being stored in the memory 11 in the form of software or firmware or being solidified in the operating system of the projection device 10. The processor 12 can be used to execute executable modules stored in the memory 11, such as software functional modules and computer programs included in the image projection apparatus 100. The projection device 10 automatically and rapidly projects the picture content of the picture to be projected into the target curtain for displaying through the picture projection apparatus 100, so as to avoid projection errors caused by manually debugging the projection device 10, and improve the viewing experience of the user. The projection device 10 may also precisely measure a shooting position corresponding relationship between the projection device 10 and the shooting device 14 with reference to the target curtain by using the picture projection apparatus 100 when the positions of the projection device 10 and the shooting device 14 relative to the target curtain are not changed, and perform parameter calibration on the shooting position corresponding relationship synchronously when the positions of the projection device 10 and/or the shooting device 14 relative to the target curtain are changed.
It will be appreciated that the block diagram of fig. 9 is merely one schematic component of projection device 10, and that projection device 10 may include more or fewer components than shown in fig. 9, or may have a different configuration than shown in fig. 9. The components shown in fig. 9 may be implemented in hardware, software, or a combination thereof.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part. The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a readable storage medium, which includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
In summary, in the image projection method, the apparatus, the projection device and the readable storage medium provided in the embodiments of the present application, the screen image shot by the shooting device for the target screen is obtained, the effective screen area in the screen image is identified, then the image to be projected is mapped into the projection area corresponding to the effective screen area according to the projection position corresponding relationship between the projection device and the shooting device with reference to the target screen, so as to obtain the corresponding image to be projected, and then the projection device is directly controlled to project the image to be projected, so that the image content of the image to be projected can be automatically and quickly projected into the target screen for display, thereby avoiding the projection error caused by manually debugging the projection device, and improving the viewing experience of the user.
In addition, this application still can be in projection equipment with shooting equipment is respectively for when the position of target curtain is unchangeable, the projection equipment with shoot equipment and use the shooting position corresponding relation of target curtain as the reference, and projection equipment and/or shooting equipment for when the position of target curtain changes, it is right in step to shoot the position corresponding relation and carry out the parameter calibration, and then guarantee projection equipment can be finally by oneself with treating that the projection picture projects and show in the target curtain, promotes user experience.
The above description is only for various embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present application, and all such changes or substitutions are included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for projecting a picture, the method comprising:
acquiring a curtain image shot by shooting equipment aiming at a target curtain;
performing curtain recognition on the curtain image, and determining an effective curtain area of the curtain image;
mapping a picture to be projected into a projection area corresponding to the effective curtain area according to the corner position of the effective curtain area in the curtain image and the projection position corresponding relation between projection equipment and shooting equipment to obtain a corresponding mapped picture to be projected;
controlling the projection equipment to project the mapping picture to be projected so that the picture content of the picture to be projected is displayed in the target curtain;
wherein, the pair of curtain images is subjected to curtain recognition, and an effective curtain area of the curtain images is determined, including:
carrying out line segment detection on the curtain image, and carrying out line segment direction clustering and line segment merging on the detected line segments to obtain a plurality of first candidate straight lines and a plurality of second candidate straight lines, wherein the first candidate straight lines are intersected with the second candidate straight lines;
selecting two first candidate straight lines with the largest distance between the adjacent first candidate straight lines from all the first candidate straight lines, and selecting two second candidate straight lines with the largest distance between the adjacent second candidate straight lines from all the second candidate straight lines to construct and form an initial curtain quadrangle;
optimizing the four-side positions of the initial curtain quadrangle according to the respective straight line distribution positions of all the first candidate straight lines and all the second candidate straight lines to obtain an optimized quadrangle curtain area;
taking the optimized quadrilateral curtain area as an effective curtain area of the curtain image;
in this process, the optimizing the four-side positions of the initial curtain quadrangle according to the respective line distribution positions of all the first candidate lines and all the second candidate lines includes:
judging whether an angular point of the initial curtain quadrangle exists on a candidate straight line where each initial side of the initial curtain quadrangle is located or not;
when the angular point exists on the candidate straight line where the initial edge is located, selecting a target candidate straight line adjacent to the initial edge along the direction far away from the opposite edge corresponding to the initial edge, replacing and resetting the initial edge based on the selected target candidate straight line, and repeating the judging steps until the angular point does not exist on the candidate straight line where the initial edge is located.
2. The method of claim 1, wherein the detecting straight line segments of the curtain image, and performing line segment direction clustering and line segment merging on the detected straight line segments to obtain a plurality of first candidate lines and a plurality of second candidate lines comprises:
performing straight-line segment detection on the curtain image, and screening out a first straight-line segment and a second straight-line segment from all the detected straight-line segments, wherein the first straight-line segment is a straight-line segment with the direction deviation degree relative to a first direction smaller than a first deviation degree threshold value, the second straight-line segment is a straight-line segment with the direction deviation degree relative to a second direction smaller than a second deviation degree threshold value, and the first direction is perpendicular to the second direction;
and performing line segment direction clustering and line segment merging on all the screened first straight lines to obtain first candidate straight lines of which the lengths of the corresponding merged line segments are not less than a first length threshold, and performing line segment direction clustering and line segment merging on all the screened second straight lines to obtain second candidate straight lines of which the lengths of the corresponding merged line segments are not less than a second length threshold.
3. The method according to claim 1, wherein the mapping a to-be-projected picture into a projection area corresponding to the effective curtain area according to a corresponding relationship between a corner position of the effective curtain area in the curtain image and a projection position between a projection device and the shooting device to obtain a corresponding to-be-projected mapped picture comprises:
carrying out position transformation on the corner position of the effective curtain area according to the shooting position corresponding relation to obtain corner mapping coordinates corresponding to the corner position of the effective curtain area in a projection coordinate system of the projection equipment;
establishing a coordinate incidence relation between the corner point mapping coordinate in the projection coordinate system and the vertex coordinate of the picture to be projected;
and performing coordinate mapping on each pixel point in the picture to be projected according to the coordinate incidence relation to obtain the picture to be projected and mapped.
4. The method according to any one of claims 1-3, further comprising:
controlling the projection equipment to project a calibration picture to a target curtain and acquiring a curtain calibration image shot by the shooting equipment aiming at the calibration picture;
calculating a first corner coordinate of the calibration picture under a projection coordinate system where the projection equipment is located, and a second corner coordinate of the calibration picture under a shooting coordinate system corresponding to the curtain calibration image;
and determining the corresponding relation of the projection position between the projection equipment and the shooting equipment according to the corresponding relation between the first corner point coordinate and the second corner point coordinate.
5. A picture projection apparatus, comprising:
the curtain image acquisition module is used for acquiring a curtain image shot by the shooting equipment aiming at a target curtain;
the curtain area identification module is used for carrying out curtain identification on the curtain image and determining an effective curtain area of the curtain image;
the picture mapping processing module is used for mapping the picture to be projected into the projection area corresponding to the effective curtain area according to the corner position of the effective curtain area in the curtain image and the corresponding relation of projection positions between the projection equipment and the shooting equipment to obtain the corresponding picture to be projected;
the projection module of the mapping picture is used for controlling the projection equipment to project the mapping picture to be projected, so that the picture content of the picture to be projected is displayed in the target curtain;
wherein, the curtain area identification module includes:
the candidate straight line extraction submodule is used for carrying out straight line segment detection on the curtain image, and carrying out line segment direction clustering and line segment merging on the detected straight line segments to obtain a plurality of first candidate straight lines and a plurality of second candidate straight lines, wherein the first candidate straight lines are intersected with the second candidate straight lines;
the quadrangle construction submodule is used for selecting two first candidate straight lines with the largest distance between adjacent first candidate straight lines from all the first candidate straight lines, selecting two second candidate straight lines with the largest distance between adjacent second candidate straight lines from all the second candidate straight lines, and constructing and forming an initial curtain quadrangle;
the quadrangle optimization submodule is used for optimizing the positions of four edges of the initial curtain quadrangle according to the respective straight line distribution positions of all the first candidate straight lines and all the second candidate straight lines to obtain an optimized quadrangle curtain area;
the curtain area determining submodule is used for taking the optimized quadrilateral curtain area as an effective curtain area of the curtain image;
in this process, the method for optimizing the four-side positions of the initial curtain quadrangle by the quadrangle optimization submodule according to the respective line distribution positions of all the first candidate lines and all the second candidate lines includes:
aiming at each initial side of the initial curtain quadrangle, judging whether an angular point of the initial curtain quadrangle exists on a candidate straight line where the initial side is located;
when the angular point exists on the candidate straight line where the initial edge is located, selecting a target candidate straight line adjacent to the initial edge along the direction far away from the opposite edge corresponding to the initial edge, replacing and resetting the initial edge based on the selected target candidate straight line, and repeating the judging steps until the angular point does not exist on the candidate straight line where the initial edge is located.
6. The apparatus of claim 5, wherein the candidate straight line extraction sub-module performs straight line segment detection on the curtain image, performs line segment direction clustering and line segment merging on the detected straight line segments, and obtains a plurality of first candidate straight lines and a plurality of second candidate straight lines, and comprises:
performing straight-line segment detection on the curtain image, and screening out a first straight-line segment and a second straight-line segment from all the detected straight-line segments, wherein the first straight-line segment is a straight-line segment with the direction deviation degree relative to a first direction smaller than a first deviation degree threshold value, the second straight-line segment is a straight-line segment with the direction deviation degree relative to a second direction smaller than a second deviation degree threshold value, and the first direction is perpendicular to the second direction;
and performing line segment direction clustering and line segment merging on all the screened first straight lines to obtain first candidate straight lines of which the lengths of the corresponding merged line segments are not less than a first length threshold, and performing line segment direction clustering and line segment merging on all the screened second straight lines to obtain second candidate straight lines of which the lengths of the corresponding merged line segments are not less than a second length threshold.
7. The apparatus according to claim 5, wherein the image mapping processing module maps the image to be projected into the projection area corresponding to the effective curtain area according to the corner position of the effective curtain area in the curtain image and the corresponding relationship between the projection device and the shooting device, so as to obtain the corresponding image to be projected, including:
carrying out position transformation on the corner position of the effective curtain area according to the shooting position corresponding relation to obtain corner mapping coordinates corresponding to the corner position of the effective curtain area in a projection coordinate system of the projection equipment;
establishing a coordinate incidence relation between the corner point mapping coordinate in the projection coordinate system and the vertex coordinate of the picture to be projected;
and performing coordinate mapping on each pixel point in the picture to be projected according to the coordinate incidence relation to obtain the picture to be projected and mapped.
8. The apparatus of any one of claims 5-7, further comprising:
the screen projection calibration module is used for controlling the projection equipment to project a calibration picture to a target screen and acquiring a screen calibration image shot by the shooting equipment aiming at the calibration picture;
the corner coordinate calculation module is used for calculating a first corner coordinate of the calibration picture under a projection coordinate system where the projection equipment is located and a second corner coordinate of the calibration picture under a shooting coordinate system corresponding to the curtain calibration image;
and the position relation creating module is used for determining the corresponding relation of the shooting positions between the projection equipment and the shooting equipment according to the corresponding relation between the first corner point coordinate and the second corner point coordinate.
9. A projection device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to implement the picture projection method of any one of claims 1-4.
10. A readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the picture projection method according to any one of claims 1 to 4.
CN202011290215.3A 2020-11-18 2020-11-18 Picture projection method and device, projection equipment and readable storage medium Active CN114520893B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011290215.3A CN114520893B (en) 2020-11-18 2020-11-18 Picture projection method and device, projection equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011290215.3A CN114520893B (en) 2020-11-18 2020-11-18 Picture projection method and device, projection equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN114520893A CN114520893A (en) 2022-05-20
CN114520893B true CN114520893B (en) 2022-10-04

Family

ID=81595295

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011290215.3A Active CN114520893B (en) 2020-11-18 2020-11-18 Picture projection method and device, projection equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114520893B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125518B (en) * 2020-06-29 2023-05-05 海信视像科技股份有限公司 Display equipment
CN116366821B (en) * 2023-06-01 2023-08-08 深圳市橙子数字科技有限公司 Automatic positioning method and device, storage medium and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4572377B2 (en) * 2003-07-02 2010-11-04 セイコーエプソン株式会社 Image processing system, projector, program, information storage medium, and image processing method
US20170070711A1 (en) * 2015-09-03 2017-03-09 Disney Enterprises, Inc. Intensity correction for projection systems
CN107547881B (en) * 2016-06-24 2019-10-11 上海顺久电子科技有限公司 A kind of auto-correction method of projection imaging, device and laser television
CN106303477B (en) * 2016-08-11 2019-01-04 深圳市Tcl高新技术开发有限公司 A kind of adaptive projector image bearing calibration and system

Also Published As

Publication number Publication date
CN114520893A (en) 2022-05-20

Similar Documents

Publication Publication Date Title
CN109257582B (en) Correction method and device for projection equipment
RU2680765C1 (en) Automated determination and cutting of non-singular contour of a picture on an image
CN113489961B (en) Projection correction method, projection correction device, storage medium and projection equipment
US9519968B2 (en) Calibrating visual sensors using homography operators
CN114520893B (en) Picture projection method and device, projection equipment and readable storage medium
US10420397B2 (en) Foot measuring and sizing application
CN112272292B (en) Projection correction method, apparatus and storage medium
CN114520894B (en) Projection area determining method and device, projection equipment and readable storage medium
US7995866B2 (en) Rotation angle detection apparatus, and control method and control program of rotation angle detection apparatus
CN112017231B (en) Monocular camera-based human body weight identification method, monocular camera-based human body weight identification device and storage medium
CN106919883B (en) QR code positioning method and device
WO2021195873A1 (en) Method and device for identifying region of interest in sfr test chart image, and medium
CN111182282B (en) Method and device for detecting projection focusing area and projector
CN114520895B (en) Projection control method, device, projection optical machine and readable storage medium
CN109410197B (en) Method and device for positioning detection area of liquid crystal display
CN114612409A (en) Projection calibration method and device, storage medium and electronic equipment
CN111369513B (en) Abnormality detection method, abnormality detection device, terminal equipment and storage medium
JP2017212638A (en) Display device, control method for display device, and program
JP2015206654A (en) Information processing apparatus, information processing method, and program
CN111142825B (en) Multi-screen visual field display method and system and electronic equipment
WO2019117472A1 (en) System and method for recognition of measurement value of analog instrument panel
CN115457055A (en) Illuminance meter value identification method, electronic device, and storage medium
JP7340487B2 (en) Program creation device, object detection system, anchor setting method and anchor setting program
CN115239612A (en) Circuit board positioning method, device, equipment and storage medium
KR101463906B1 (en) Location Correction Method Using Additional Image Information

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
GR01 Patent grant
GR01 Patent grant