Invention content
The embodiment of the present invention is designed to provide the method and device that target 3D information is shown in a kind of 2D videos, to carryHigh 3D information bandwagon effect.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of method that target 3D information is shown in 2D videos, packetsIt includes:
It determines the peak of the image of current goal, minimum point in 2D videos, determines the image of current goal in 2D videosWidth;
Using the peak as the first elliptical center of circle, using the minimum point as the second elliptical center of circle, with describedWidth is as the described first oval and the described second elliptical long axis length;
It determines and generates the video capture devices of the 2D videos to the line of the peak and the first angle of horizontal plane,The length of the described first elliptical short axle is determined according to first angle and the width;It determines and generates regarding for the 2D videosFrequency collecting device is determined to the line of the minimum point and the second angle of horizontal plane according to second angle and the widthThe length of the second elliptical short axle;
It determines and draws position with the matched cylindrical body of the current goal and frame, wherein the cylindrical bodyIt is made of described first oval, described second oval, the first line segment and second line segment, wherein first line segment is connected to instituteIt states between the first oval leftmost side point and second oval leftmost side point, the second line segment is connected to first ellipse mostBetween right-hand point and second oval rightmost side point;
It is drawn in the frame of the 2D videos and draws the cylindrical body at position.
Optionally, further include:
According to mounting height, setting angle and the peak of the video capture device for generating the 2D videos, reallyThe height of the fixed current goal;
The height of the current goal is shown in the 2D videos.
Optionally, mounting height, setting angle and the institute according to the video capture device for generating the 2D videosPeak is stated, determines the height of the current goal, including:
Pass through formula
Determine the height Y of the current goal, wherein HcamFor the installation of the video capture device of the generation 2D videosHighly, (xc, yc, zc) it is coordinate of the peak under video capture device coordinate system;θ is to generate regarding for the 2D videosThe angle of inclination of the left and right directions of frequency collecting device;The in the front-back direction of video capture device to generate the 2D videos inclinesRake angle.
Optionally, different from the color of the cylindrical body of different target images match.
Optionally, after the determining and matched cylindrical body of the current goal and frame draw position, describedThe frame of 2D videos is drawn at position before the drafting cylindrical body, and the method further includes:
Determine that each target is at a distance from the video capture device for generating the 2D videos in the 2D videos;
Determine the objects ahead of the video capture device of the 2D videos more described than the closer generation of the current goal;
Whether the objects ahead will can be passed through described in judgement in the cylindrical body at identified drafting positionImage, if it is, can will be deleted across the part frame of the image of the objects ahead in cylindrical body determined by deletingExcept treated, cylindrical body determines and the matched cylindrical body of the current goal.
Optionally, further include:
Motion track of the second elliptical center of circle of the cylindrical body of drafting in first time period is determined asThe motion track of the current goal;
Motion track determined by being drawn on the 2D videos.
The device of target 3D information is shown in a kind of 2D videos, including:Target image determination unit, oval determination unit,Short axle determination unit, frame determination unit and frame drawing unit,
The target image determination unit, for determining the peak of the image of current goal, minimum point in 2D videos, reallyDetermine the width of the image of current goal in 2D videos;
The ellipse determination unit, for using the peak as the first elliptical center of circle, using the minimum point asThe second elliptical center of circle, using the width as the described first oval and the described second elliptical long axis length;
The short axle determination unit, for determining company of the video capture device for generating the 2D videos to the peakFirst angle of line and horizontal plane determines the length of the described first elliptical short axle according to first angle and the width;The video capture device for generating the 2D videos is determined to the line of the minimum point and the second angle of horizontal plane, according to instituteIt states the second angle and the width determines the length of the described second elliptical short axle;
The frame determination unit draws position for determining with the matched cylindrical body of the current goal and frameIt sets, wherein the cylindrical body is made of first ellipse, described second oval, the first line segment and second line segment,In, first line segment is connected between the described first oval leftmost side point and second oval leftmost side point, and described secondLine segment is connected between the described first oval rightmost side point and second oval rightmost side point;
The frame drawing unit draws the cylinder frame for being drawn in the frame of the 2D videos at positionFrame.
Optionally, further include:Height determination unit and height display unit,
The height determination unit, for the mounting height according to the video capture device for generating the 2D videos, installationAngle and the peak, determine the height of the current goal;
The height display unit, the height for showing the current goal in the 2D videos.
Optionally, the height determination unit, is specifically used for:
Pass through formula
Determine the height Y of the current goal, wherein HcamFor the installation of the video capture device of the generation 2D videosHighly, (xc, yc, zc) it is coordinate of the peak under video capture device coordinate system;θ is to generate regarding for the 2D videosThe angle of inclination of the left and right directions of frequency collecting device;The in the front-back direction of video capture device to generate the 2D videos inclinesRake angle.
Optionally, different from the color of the cylindrical body of different target images match.
Optionally, described device further includes:Distance determining unit, passes through judging unit and frame at objects ahead determination unitFrame deleting unit,
The distance determining unit, for being determined and the matched cylinder of the current goal in the frame determination unitAfter frame and frame draw position, before the frame drawing unit draws the cylindrical body, determine that the 2D is regardedEach target is at a distance from the video capture device for generating the 2D videos in frequency;
The objects ahead determination unit, for determining regarding for the closer generation 2D videos than the current goalThe objects ahead of frequency collecting device;
It is described to pass through judging unit, for judge it is described will the cylindrical body at identified drafting position whetherIt can be across the image of the objects ahead, if it is, triggering the frame deleting unit;
The frame deleting unit, can be across the image of the objects ahead in identified cylindrical body for deletingPart frame, by after delete processing cylindrical body determine with the matched cylindrical body of the current goal.
Optionally, further include:Track determination unit and track drawing unit,
The track determination unit, the second elliptical center of circle of the cylindrical body for that will draw is at the first timeMotion track in section is determined as the motion track of the current goal;
The track drawing unit, for drawing identified motion track on the 2D videos.
The method and device that target 3D information is shown in a kind of 2D videos provided in an embodiment of the present invention, can regard according to 2DThe Image Rendering cylindrical body of current goal is to indicate the 3D information of current goal in frequency.Due to cylindrical body line segment compared withIt is few, thus it is close when generate obscure that possibility is smaller, the bandwagon effect of the 3D information of target of the invention is preferable.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, completeSite preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based onEmbodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every otherEmbodiment shall fall within the protection scope of the present invention.
As shown in Fig. 2, an embodiment of the present invention provides a kind of method for showing target 3D information in 2D videos, can wrapIt includes:
S100, the peak of the image of current goal, minimum point in 2D videos are determined, determines current goal in 2D videosThe width of image;
Wherein, current goal can be people, can also other objects, such as animal, object (such as automobile), the present invention is not doneIt limits.
S200, using the peak as the first elliptical center of circle, using the minimum point as the second elliptical center of circle, withThe width is as the described first oval and the described second elliptical long axis length;
The first of S300, the line of the determining video capture device for generating the 2D videos to the peak and horizontal planeAngle determines the length of the described first elliptical short axle according to first angle and the width;Determine that generating the 2D regardsThe video capture device of frequency is to the line of the minimum point and the second angle of horizontal plane, according to second angle and describedWidth determines the length of the described second elliptical short axle;
Wherein it is possible to by the conversion between world coordinate system and image coordinate system, according to the first angle and the widthDetermine the length of the described first elliptical short axle.Specific transfer process between world coordinate system and image coordinate system is existing skillArt, the present invention repeat no more.
Wherein it is determined that generate the video capture devices of the 2D videos to the minimum point line and horizontal plane secondAngle determines the process and above process class of the length of the described second elliptical short axle according to second angle and the widthSeemingly, it repeats no more.
S400, determination and the matched cylindrical body of the current goal and frame draw position, wherein the cylinderFrame is made of first ellipse, described second oval, the first line segment and second line segment, wherein the first line segment connectionBetween the described first oval leftmost side point and second oval leftmost side point, it is ellipse that the second line segment is connected to described firstBetween circle rightmost side point and second oval rightmost side point;
S500, the cylindrical body is drawn at the frame drafting position of the 2D videos.
The present invention draws the identical object used in background technology, and it is as shown in Figure 3 to draw effect.Wherein, circleCylinder frame 003 is plotted near the image 003 of target.Pass through comparison, it can be seen that the present invention passes through cylindrical body tableThe 3D information for showing target, since cylindrical body line segment is less, generated when close to obscure possibility smaller, it is of the inventionThe bandwagon effect of the 3D information of target is preferable.
Specifically, can be different from the color of the cylindrical body of different target images match.It, can by the differentiation of colorSo that user is more easy to distinguish the 3D information of different target.
Optionally, in other embodiments of the present invention, method shown in Fig. 2 can also include:
According to mounting height, setting angle and the peak of the video capture device for generating the 2D videos, reallyThe height of the fixed current goal;
The height of the current goal is shown in the 2D videos.
Specifically, as shown in Figure 4.Highly 005 may be displayed on above the image of current goal.
Wherein, described according to the mounting height for the video capture device for generating the 2D videos, setting angle and describedPeak determines the height of the current goal, may include:
Pass through formula
Determine the height Y of the current goal, wherein HcamFor the installation of the video capture device of the generation 2D videosHighly, (xc, yc, zc) it is coordinate of the peak under video capture device coordinate system;θ is to generate regarding for the 2D videosThe angle of inclination of the left and right directions of frequency collecting device;The in the front-back direction of video capture device to generate the 2D videos inclinesRake angle.
In a kind of 2D videos provided in an embodiment of the present invention show target 3D information method, can according in 2D videos whenThe Image Rendering cylindrical body of preceding target is to indicate the 3D information of current goal.Since cylindrical body line segment is less,Possibility is smaller for obscuring of being generated when close, and the bandwagon effect of the 3D information of target of the invention is preferable.
On the basis of embodiment shown in Fig. 2, as shown in figure 5, being shown in another kind 2D videos provided in an embodiment of the present inventionThe method of target 3D information before step S500, can also include after step S400:
S410, determine that each target is at a distance from the video capture device for generating the 2D videos in the 2D videos;
It, can root due to having obtained mounting height, the setting angle of the video capture device for generating the 2D videosDetermine target at a distance from the video capture device for generating the 2D videos according to target image.It is adopted according to the video for generating 2D videosMounting height, setting angle and the target image of collection equipment determine that target is at a distance from the video capture device for generating 2D videosThe prior art, the present invention repeat no more.
Specifically, can determine that each target is set with the video acquisition for generating the 2D videos by technique of binocular stereoscopic visionStandby distance.
S420, determine more described than the closer generation of current goal 2D videos video capture device front meshMark;
Whether the front mesh will can be passed through described in S430, judgement in the cylindrical body at identified drafting positionTarget image, if so, thening follow the steps S440;It is no to then follow the steps S500;
It can will be deleted across the part frame of the image of the objects ahead in cylindrical body determined by S440, deletionExcept treated, cylindrical body determines and the matched cylindrical body of the current goal.
Can be across the part frame of the image of the objects ahead by deleting, effect is as shown in fig. 6, can further dropInterference between low cylindrical body, facilitates user to differentiate.
In other embodiments of the present invention, can also include:
Motion track of the second elliptical center of circle of the cylindrical body of drafting in first time period is determined asThe motion track of the current goal;
Motion track determined by being drawn on the 2D videos.
By the drafting of motion track, user can be helped to understand the motion track of target in time, it is more convenient.Specifically, the track 006 that effect can be as shown in Figure 7 is drawn in track.
Corresponding with above method embodiment, the embodiment of the present invention, which additionally provides, shows target 3D information in a kind of 2D videosDevice.
As shown in figure 8, showing the device of target 3D information in a kind of 2D videos provided in an embodiment of the present invention, can wrapIt includes:Target image determination unit 100, oval determination unit 200, short axle determination unit 300, frame determination unit 400 and frameDrawing unit 500,
The target image determination unit 100, for determining the peak of the image of current goal in 2D videos, minimumPoint determines the width of the image of current goal in 2D videos;
Wherein, current goal can be people, can also other objects, such as animal, object (such as automobile), the present invention is not doneIt limits.
The ellipse determination unit 200, for using the peak as the first elliptical center of circle, being made with the minimum pointFor the second elliptical center of circle, using the width as the described first oval and the described second elliptical long axis length;
The short axle determination unit 300, for the determining video capture device for generating the 2D videos to the peakLine and horizontal plane the first angle, the length of the described first elliptical short axle is determined according to first angle and the widthDegree;It determines and generates the video capture devices of the 2D videos to the line of the minimum point and the second angle of horizontal plane, rootThe length of the described second elliptical short axle is determined according to second angle and the width;
The frame determination unit 400 is drawn for determining with the matched cylindrical body of the current goal and framePosition, wherein the cylindrical body is made of first ellipse, described second oval, the first line segment and second line segment,In, first line segment is connected between the described first oval leftmost side point and second oval leftmost side point, and described secondLine segment is connected between the described first oval rightmost side point and second oval rightmost side point;
The frame drawing unit 500 draws the cylinder for being drawn in the frame of the 2D videos at positionBody frame.
It wherein, can be different from the color of the cylindrical body of different target images match.
In other embodiments of the present invention, Fig. 7 shown devices can also include:Height determination unit and height show singleMember,
The height determination unit, for the mounting height according to the video capture device for generating the 2D videos, installationAngle and the peak, determine the height of the current goal;
The height display unit, the height for showing the current goal in the 2D videos.
Specifically, the height determination unit, can be specifically used for:
Pass through formula
Determine the height Y of the current goal, wherein HcamFor the installation of the video capture device of the generation 2D videosHighly, (xc, yc, zc) it is coordinate of the peak under video capture device coordinate system;θ is to generate regarding for the 2D videosThe angle of inclination of the left and right directions of frequency collecting device;The in the front-back direction of video capture device to generate the 2D videos inclinesRake angle.
In a kind of 2D videos provided in an embodiment of the present invention show target 3D information device, can according in 2D videos whenThe Image Rendering cylindrical body of preceding target is to indicate the 3D information of current goal.Since cylindrical body line segment is less,Possibility is smaller for obscuring of being generated when close, and the bandwagon effect of the 3D information of target of the invention is preferable.
In other embodiments of the present invention, the device of displaying target 3D information may be used also in a kind of above-mentioned any 2D videosTo include:Distance determining unit, passes through judging unit and frame deleting unit at objects ahead determination unit,
The distance determining unit, for being determined and the matched circle of the current goal in the frame determination unit 400After cylinder frame and frame draw position, position is drawn in the frame of the 2D videos in the frame drawing unit 500Before setting place's drafting cylindrical body, determine that the video acquisition of each target and the generation 2D videos is set in the 2D videosStandby distance;
The objects ahead determination unit, for determining regarding for the closer generation 2D videos than the current goalThe objects ahead of frequency collecting device;
It is described to pass through judging unit, for judge it is described will the cylindrical body at identified drafting position whetherIt can be across the image of the objects ahead, if it is, triggering the frame deleting unit;
The frame deleting unit, can be across the image of the objects ahead in identified cylindrical body for deletingPart frame, by after delete processing cylindrical body determine with the matched cylindrical body of the current goal.
Can be across the part frame of the image of the objects ahead by deleting, effect is as shown in fig. 6, can further dropInterference between low cylindrical body, facilitates user to differentiate.
In other embodiments of the present invention, the device of displaying target 3D information may be used also in a kind of above-mentioned any 2D videosTo include:Track determination unit and track drawing unit,
The track determination unit, the second elliptical center of circle of the cylindrical body for that will draw is at the first timeMotion track in section is determined as the motion track of the current goal;
The track drawing unit, for drawing identified motion track on the 2D videos.
By the drafting of motion track, user can be helped to understand the motion track of target in time, it is more convenient.Specifically, the track 006 that effect can be as shown in Figure 7 is drawn in track.
It should be noted that herein, relational terms such as first and second and the like are used merely to a realityBody or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operationIn any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended toNon-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including thoseElement, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipmentIntrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded thatThere is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, identical similar portion between each embodimentPoint just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for system realityFor applying example, since it is substantially similar to the method embodiment, so description is fairly simple, related place is referring to embodiment of the methodPart explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is allAny modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present inventionIt is interior.