WO2019096323A1 - Fisheye image processing method and apparatus, and electronic device - Google Patents

Fisheye image processing method and apparatus, and electronic device Download PDF

Info

Publication number
WO2019096323A1
WO2019096323A1 PCT/CN2018/116356 CN2018116356W WO2019096323A1 WO 2019096323 A1 WO2019096323 A1 WO 2019096323A1 CN 2018116356 W CN2018116356 W CN 2018116356W WO 2019096323 A1 WO2019096323 A1 WO 2019096323A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
coordinate value
coordinate
value
dimensional
Prior art date
Application number
PCT/CN2018/116356
Other languages
French (fr)
Chinese (zh)
Inventor
林耀冬
Original Assignee
杭州海康威视数字技术股份有限公司
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 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Publication of WO2019096323A1 publication Critical patent/WO2019096323A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image

Definitions

  • the present application relates to the field of image processing technologies, and in particular, to a fisheye image processing method, apparatus, and electronic device.
  • the coordinate value of the three-dimensional cylindrical coordinate point includes: a first coordinate value, a second coordinate value, and a third coordinate value, where coordinate values of the expanded surface image coordinate point corresponding to the one time value include: fourth coordinate a value, a fifth coordinate value, and a sixth coordinate value;
  • the calculating the mapped fourth coordinate value according to the first coordinate value, the arc length between the first coordinate value and the preset reference point, and the ratio may include:
  • An arc length between the first coordinate value and a preset reference point a radius of the three-dimensional cylinder * ( ⁇ - viewpoint angle);
  • the viewpoint angle tan -1 (absolute value of the first coordinate value / third coordinate value);
  • the calculating the mapped sixth coordinate value according to the third coordinate value, the radius of the three-dimensional cylinder, and the ratio may include:
  • the sixth coordinate value to be mapped the third coordinate value + the ratio * (- the radius of the three-dimensional cylinder - the third coordinate value).
  • mapping the three-dimensional cylindrical image according to the mapping relationship between the preset three-dimensional cylindrical coordinate point and the expanded planar image coordinate point, and obtaining the expanded planar image which may include:
  • the inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
  • a seventh coordinate value sign (first coordinate value)* an arc length between the first coordinate value and the preset reference point;
  • An arc length between the first coordinate value and a preset reference point a radius of the three-dimensional cylinder * ( ⁇ - viewpoint angle);
  • the viewpoint angle tan -1 (absolute value of the first coordinate value / third coordinate value).
  • the method further includes:
  • the method further includes:
  • the depth of field of the three-dimensional cylindrical image is adjusted to the target depth of field.
  • the method further includes:
  • the depth of field of the three-dimensional cylindrical image is adjusted to the target depth of field.
  • Transition Depth of Field stored time value / said zoom duration * (target depth of field - current depth of field of the 3D cylindrical image) + current depth of field of the 3D cylindrical image.
  • the duplicate image is added to the expanded plane image according to the mapping relationship.
  • an embodiment of the present application further provides a fisheye image processing apparatus, wherein the apparatus includes:
  • a first mapping module configured to map the image of the fisheye to be processed to a three-dimensional cylindrical surface according to a mapping relationship between a preset fisheye image coordinate point and a three-dimensional cylindrical coordinate point, to obtain a three-dimensional cylindrical image
  • the second mapping module is configured to map the three-dimensional cylindrical image according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed surface image coordinate point after receiving the cylindrical surface expansion instruction, to obtain a developed surface image.
  • the second mapping module is specifically configured to:
  • timing sub-module configured to start a timer after receiving a cylindrical expansion command, and determine an expansion time
  • a determining sub-module configured to determine whether the stored time value is less than the expansion time; if not, triggering the first mapping sub-module, if greater than or equal to, triggering the second mapping sub-module;
  • a first mapping sub-module configured to map the three-dimensional cylindrical image according to a third mapping relationship corresponding to the stored time value, to obtain an expanded surface image corresponding to the stored time value; wherein, greater than or equal to 0 and less than Each time value of the expansion time length corresponds to a third mapping relationship, and a third mapping relationship is: a mapping relationship between the coordinate points of the three-dimensional cylindrical coordinate points and the expanded surface image corresponding to a time value;
  • the second mapping sub-module is configured to map the three-dimensional cylindrical image according to a mapping relationship between the preset three-dimensional cylindrical coordinate points and the developed planar image coordinate points, to obtain an expanded planar image.
  • the coordinate value of the three-dimensional cylindrical coordinate point includes: a first coordinate value, a second coordinate value, and a third coordinate value, where coordinate values of the expanded surface image coordinate point corresponding to the one time value include: a fourth coordinate a value, a fifth coordinate value, and a sixth coordinate value;
  • the first mapping submodule may be specifically configured to:
  • the mapped sixth coordinate value is calculated according to the third coordinate value, the radius of the three-dimensional cylinder, and the ratio.
  • the first mapping submodule is specifically configured to:
  • the fourth coordinate value to be mapped the first coordinate value + the ratio * [sign (first coordinate value) * the arc length between the first coordinate value and the preset reference point - the first coordinate value];
  • the viewpoint angle tan -1 (absolute value of the first coordinate value / third coordinate value);
  • the sixth coordinate value to be mapped the third coordinate value + the ratio * (- the radius of the three-dimensional cylinder - the third coordinate value).
  • the coordinate value of the three-dimensional cylindrical coordinate point includes: a first coordinate value, a second coordinate value, and a third coordinate value, where the coordinate value of the developed planar image coordinate point includes: a seventh coordinate value, an eighth coordinate Value and ninth coordinate value;
  • the second mapping submodule may be specifically configured to:
  • the inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
  • the second mapping sub-module may be specifically configured to: perform calculation by using the following formula:
  • a seventh coordinate value sign (first coordinate value)* an arc length between the first coordinate value and the preset reference point;
  • An arc length between the first coordinate value and a preset reference point a radius of the three-dimensional cylinder * ( ⁇ - viewpoint angle);
  • the viewpoint angle tan -1 (absolute value of the first coordinate value / third coordinate value);
  • the inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
  • the device further includes: a first receiving module, a first determining module, and a rotating module, or the device further includes: a second receiving module, a second determining module, and a first adjusting module, where
  • a first receiving module configured to receive a rotating cylinder command sent by a user
  • a first determining module configured to determine a rotation angle corresponding to the rotating cylinder instruction
  • a rotation module configured to rotate the three-dimensional cylindrical image by the rotation angle by using a center line of the three-dimensional cylindrical image as an axis
  • the first adjustment module is configured to adjust the three-dimensional cylindrical image according to the determined viewpoint angle and depth of field.
  • a third receiving module configured to receive a scaling instruction sent by the user
  • a third determining module configured to determine a target depth of field corresponding to the scaling instruction
  • a second adjustment module configured to adjust a depth of field of the three-dimensional cylindrical image to the target depth of field.
  • a judging module configured to determine whether the stored time value is less than the zooming time length; if not, triggering the third adjusting module, if greater than or equal to, triggering the fourth adjusting module;
  • a calculation sub-module configured to calculate a transition depth of field corresponding to the stored time value, wherein each time value greater than or equal to 0 and less than the zoom duration corresponds to a transition depth of field, and the transition depth of field is located at a current depth of field of the three-dimensional cylindrical image Between the target depths of field;
  • the calculating sub-module may be specifically configured to: perform calculation by using the following formula:
  • Transition Depth of Field stored time value / said zoom duration * (target depth of field - current depth of field of the 3D cylindrical image) + current depth of field of the 3D cylindrical image.
  • the device may further include:
  • a fifth determining module configured to determine, according to the mapping relationship, that an expanded edge line of the expanded plane image is mapped to a corresponding position in the three-dimensional cylindrical image
  • an embodiment of the present application further provides an electronic device, including a processor and a memory;
  • a memory for storing a computer program
  • the processor is configured to implement any of the above-described fisheye image processing methods when executing a program stored on the memory.
  • the fisheye image is mapped onto the three-dimensional cylindrical surface to obtain a three-dimensional cylindrical image, and after receiving the cylindrical surface expansion instruction, the three-dimensional cylindrical image is mapped to obtain a developed surface image; in the present scheme, the image of the three-dimensional cylindrical image is obtained. It is better than the hemisphere image. If you want to see the image area of the back view, you don't need to manually rotate the 3D cylinder. You only need to send a cylindrical expansion command to see the expansion surface image.
  • the expansion surface image contains The image area of the large viewing angle, therefore, improves the display effect of the image.
  • FIG. 5 is a top view of a three-dimensional cylindrical image expanded into a planar image in the embodiment of the present application;
  • FIG. 6 is a schematic diagram of a process of expanding a three-dimensional cylindrical image into a planar image according to an embodiment of the present application
  • FIG. 7 is a top view showing another three-dimensional cylindrical image expanded into a planar image in the embodiment of the present application.
  • FIG. 8 is a schematic diagram of transformation of a three-dimensional cylindrical image rotated at different angles according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram showing transformation of different depth of field of a three-dimensional cylindrical image in an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • a fisheye image processing method provided by an embodiment of the present application is described in detail below.
  • FIG. 1 is a schematic flowchart of a fisheye image processing method according to an embodiment of the present application, including:
  • S101 Acquire an image of a fisheye to be processed.
  • the fisheye image is mapped onto the three-dimensional cylindrical surface to obtain a three-dimensional cylindrical image, and after receiving the cylindrical surface expansion instruction, the three-dimensional cylindrical image is mapped to obtain a developed surface image; in the scheme, three-dimensional
  • the image of the cylindrical image is better than the hemisphere image. If you want to see the image area of the back view, you don't need to manually rotate the 3D cylinder. You only need to send the cylindrical expansion command to see the expansion surface image.
  • the image contains an image area with a large viewing angle, thus improving the image display effect.
  • S101 Acquire an image of a fisheye to be processed.
  • the image to be processed can be as shown in FIG. 2, and FIG. 2 is an image collected by the fisheye camera.
  • the fisheye image is a two-dimensional image
  • the fisheye image coordinate system is also a two-dimensional coordinate system.
  • the fisheye image coordinate system is represented as a uv coordinate system.
  • the three-dimensional cylindrical image is a three-dimensional image
  • the three-dimensional cylindrical coordinate system is a three-dimensional coordinate system.
  • the three-dimensional cylindrical coordinate system is represented as an xyz coordinate system.
  • the coordinate value of a fisheye image coordinate point p in the fisheye image coordinate system is (u, v)
  • the coordinate value of a three-dimensional cylindrical coordinate point p' in the three-dimensional cylindrical coordinate system is (x, y, z).
  • the height of the three-dimensional cylinder is h
  • the radius is r
  • the line connecting the fisheye image coordinate point p and the center of the cylinder bottom is in the xz plane.
  • the angle between the projection line and the x-axis is ⁇ , and the mapping relationship can be:
  • the fisheye image coordinate points in the fisheye image to be processed are mapped to the three-dimensional cylindrical coordinate points in the three-dimensional cylindrical coordinate system, and a three-dimensional cylindrical image is obtained, and the three-dimensional cylindrical image can be as shown in FIG.
  • the unfolding surface image may be a planar image, a wavy image, a curved image of a preset curvature, or the like, which is not limited in detail.
  • the three-dimensional cylindrical image is mapped to obtain a developed surface image, that is, the three-dimensional cylindrical image is expanded, and the height of the developed surface image can be the same as the height of the three-dimensional cylindrical image.
  • FIG. 5 is a plan view of expanding a three-dimensional cylindrical image into a planar image, and it is assumed that point B in FIG. 5 is a point in the three-dimensional cylindrical image, point B.
  • the point mapped to the plane image is point E
  • the point O is the reference point for the expansion of the three-dimensional cylindrical image
  • the coordinates of point B are (x, y, z)
  • the coordinates of point E are (sign(x)*s, y, -r)
  • s is the arc length of the OB.
  • mapping relationship between the three-dimensional cylindrical coordinate points and the plane image coordinate points is: mapping (x, y, z) to the mapping relationship of (sign(x)*s, y, -r).
  • mapping relationship the points of the three-dimensional cylindrical image are mapped into the planar image, and a planar image is obtained.
  • an electronic device (executing body, hereinafter referred to as an electronic device) that executes the present solution may include a display screen, or may be communicably connected to a display device; a three-dimensional cylindrical image may be displayed on a display screen or a display device. Expand to the intermediate process of expanding the face image.
  • S103 can include:
  • Step 1 After receiving the cylindrical surface expansion instruction, determine the expansion duration, and the first mapping relationship between the target expansion surface image and the three-dimensional cylindrical image.
  • the expansion time is the length of time from the receipt of the cylindrical expansion command to the end of the expansion.
  • the expansion time can be preset; or the expansion time can be determined according to the cylindrical expansion command.
  • the execution body is a touch screen device, and the cylindrical surface expansion instruction can be a user gesture, and the expansion time is determined according to the magnitude of the user gesture amplitude; for example, the execution body is a computer, and the cylindrical surface expansion instruction can be an instruction for the user to click the mouse, according to the user click
  • the frequency of the mouse determines the length of the expansion, and so on, and is not limited.
  • the target expansion surface image is an expansion surface image obtained after the expansion is completed.
  • the shape of the target expansion surface image may be various, such as a planar image, a wavy image, a curved image of a preset curvature, and the like, which are not limited.
  • the shape of the target expansion surface image may be preset, and the mapping relationship between the three-dimensional cylindrical coordinate point and the target development surface of the preset shape may be calculated.
  • a plurality of mapping relationships are mentioned.
  • the mapping relationship between the target expansion surface image and the three-dimensional cylindrical image is referred to as a first mapping relationship.
  • the shape of the target development surface image may be determined according to the cylindrical surface expansion command.
  • the button 1 corresponds to a plane image
  • the button 2 corresponds to a wave image. If the user clicks the button 1, the target expansion surface image is a planar image. If the user clicks the button 2, the target expansion surface image is a wave image. For example, it is detected that the user clicks the mouse to indicate that the target expansion surface image is a flat image, and the user is detected that the user clicks on the mouse twice, indicating that the target expansion surface image is a wave image, and so on, and is not enumerated one by one.
  • the mapping relationship between the three-dimensional cylindrical coordinate point and the planar image is calculated as the first mapping relationship; if the target expanded image is determined to be a wavy image, the three-dimensional cylindrical coordinate point and the wavy shape are calculated. The mapping relationship of the image as the first mapping relationship.
  • Step 2 Determine, according to the expansion duration and the first mapping relationship, a second mapping relationship between the expansion surface image and the three-dimensional cylindrical image at each time before reaching the expansion duration.
  • the expansion of the image from the three-dimensional cylindrical image to obtain the target expansion surface image can be a uniform expansion process.
  • linear interpolation between the three-dimensional cylindrical image and the target expansion surface image may be performed according to the expansion duration, that is, linear interpolation between the three-dimensional cylindrical coordinate point included in the first mapping relationship and the target expansion surface image coordinate point .
  • the first mapping relationship is: mapping (x, y, z) to the mapping relationship of (sign(x)*s, y, -r) .
  • the expansion time is T
  • the second mapping relationship corresponding to each moment in T is: mapping (x, y, z) to ⁇ x+t*sign( x)
  • t is a process quantity in T, or t is the percentage of the expansion process. For example, T is 1 second, and the expansion process has continued for 0.5 seconds at the current moment, then t is 50%.
  • Step 3 For each time before the expansion time is reached, the three-dimensional cylindrical image is mapped according to the second mapping relationship corresponding to the time, and the time expansion surface image is obtained.
  • step 2 a second mapping relationship corresponding to each moment in the T is obtained.
  • the three-dimensional cylindrical image is mapped according to the second mapping relationship corresponding to the moment, and each of the Ts is obtained.
  • the expanded face image of the moment, so that is presented to the user is a dynamic expansion process.
  • Step 3 When the deployment duration is reached, the three-dimensional cylindrical image is mapped according to the first mapping relationship to obtain the target expansion surface image.
  • the expansion is completed, and the image of the target expansion surface is displayed to the user. Therefore, according to the first mapping relationship, the three-dimensional cylindrical image is mapped to obtain a target expansion surface image.
  • S103 may include:
  • the three-dimensional cylindrical image is mapped to obtain an expanded surface image corresponding to the stored time value; wherein, each of the expansion time is greater than or equal to 0
  • the time values respectively correspond to a third mapping relationship, and a third mapping relationship is: a mapping relationship between the three-dimensional cylindrical coordinate points and a coordinate value of the expanded curved image corresponding to a time value;
  • the three-dimensional cylindrical image is mapped according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed planar image coordinate point, and an expanded planar image is obtained.
  • the expansion time is the length of time from the reception of the cylindrical surface expansion command to the end of the expansion.
  • the expansion time can be preset; or the expansion time can be determined according to the cylindrical expansion command.
  • the expansion time is denoted by T, and the time value stored in the timer is denoted as T'. That is to say, within the T after receiving the cylindrical surface expansion instruction is the expansion process, and after T is the process of displaying the surface of the target expansion surface.
  • the expansion process is dynamic.
  • the content of the screen at each moment in the expansion process is different.
  • the content of the screen is the expanded surface image, as shown in Figure 6.
  • the presentation process for a flat image is static, only the planar image is shown, but if other instructions are received during the presentation, other instructions are executed.
  • the timer is started, and the T' value in the timer gradually increases from 0 to 0; if T' is smaller than T, the 3D cylindrical image needs to be mapped to the expanded surface.
  • different T' values correspond to different mapping relationships, and the expanded surface images at different times are different.
  • the mapping relationship between the coordinate points of the developed curved surface image corresponding to a T' value of the three-dimensional cylindrical coordinate point is referred to as a third mapping relationship.
  • the coordinate values of the three-dimensional cylindrical coordinate points include: a first coordinate value, a second coordinate value, and a third coordinate value
  • the expanded surface image coordinate points corresponding to the one time value include: a fourth coordinate value and a fifth coordinate value And sixth coordinate value
  • mapping the three-dimensional cylindrical image according to the third mapping relationship corresponding to the ratio including:
  • the mapped sixth coordinate value is calculated according to the third coordinate value, the radius of the three-dimensional cylinder, and the ratio.
  • FIG. 7 is similar to FIG. 5 except that the point P in the display process is added, the point B is a point in the three-dimensional cylindrical image, and the point B is mapped to the point in the plane image as E.
  • Point point O is the preset reference point, point P is a point in the process of expanding point B to point E.
  • the coordinate values of point P include: fourth coordinate value, fifth coordinate value and sixth coordinate value; point B
  • the coordinates are (x, y, z)
  • the coordinates of point E are (sign(x)*s, y, -r)
  • s is the arc length of OB.
  • the first coordinate value is x
  • the second coordinate value is y
  • the third coordinate value is z
  • the coordinate of the three-dimensional cylindrical coordinate point is (x, y, z)
  • the arc between x and the preset reference point The length of the arc is OB:
  • mapping relationship of t at each moment in the interval (0, 1) can be calculated.
  • the expanded surface at each moment can be obtained, that is, the three-dimensional cylinder is displayed.
  • the dynamic process of expanding the image to a flat image shows that the effect is good.
  • the expansion process is completed, and only the expanded planar image is displayed.
  • the coordinate values of the three-dimensional cylindrical coordinate points include: a first coordinate value, a second coordinate value, and a third coordinate value
  • the coordinate values of the expanded planar image coordinate point include: a seventh coordinate value, an eighth coordinate value, and Ninth coordinate value
  • mapping the three-dimensional cylindrical image according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed planar image coordinate point, to obtain an expanded planar image including:
  • the inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
  • the first coordinate value is x
  • the second coordinate value is y
  • the third coordinate value is z
  • the coordinate of the three-dimensional cylindrical coordinate point is (x, y, z)
  • the arc between x and the preset reference point The arc length of the length OB
  • the coordinate value of the E point includes: a seventh coordinate value, an eighth coordinate value, and a ninth coordinate value:
  • the points of the three-dimensional cylindrical image are mapped into the developed planar image, and the developed planar image is obtained.
  • the fisheye image coordinate system is a uv coordinate system.
  • the fisheye image to be processed is mapped onto the three-dimensional cylindrical surface to obtain a three-dimensional cylindrical image.
  • the coordinate point of the fisheye image to be processed is (u, v), and the coordinate point of the three-dimensional cylindrical image is (x, y, z).
  • the cylindrical surface expansion command is received, the timer is started, and the time value stored in the timer is recorded as T'.
  • the target expansion surface image is a planar image, assuming that the expansion time is T.
  • the third mapping relationship the three-dimensional cylindrical image is mapped to obtain an expanded curved surface image.
  • the determined mapping relationship is a mapping relationship that maps (x, y, z) to (sign(x)*s, y, -r); according to the mapping relationship, the three-dimensional cylindrical image is performed. Map to get the expanded planar image.
  • the unfolding process is dynamic, and the content of the screen at each moment in the unfolding process is different, and the content of the screen is an expanded curved image, as shown in FIG. 6.
  • the presentation process for a flat image is static, only the planar image is shown, but if other instructions are received during the presentation, other instructions are executed. For example, if a signal of a double click of the right mouse button is received, a full expansion instruction is generated, and the three-dimensional cylindrical image is expanded into a planar image. In the process of displaying the planar image, upon receiving the restoration instruction, the image is restored to the three-dimensional cylindrical image.
  • the method may further include:
  • the display screen included in the electronic device or the display device connected to the electronic device may be a touch screen, and the user may send a rotating cylinder instruction by making a gesture on the touch screen, for example, if the electronic device detects that the user slides left and right on the touch screen The gesture indicates that the rotary cylinder command was received.
  • the specific correspondence between the gesture and the command content can be set according to the actual situation. For example, it can be set to slide to the left to rotate clockwise, to the right to rotate counterclockwise, and to set the corresponding relationship between the amplitude of the slide and the angle of rotation.
  • the angle of rotation can be positive or negative, for example, clockwise rotation is positive and counterclockwise rotation is negative.
  • the rotation angle corresponding to the gesture is determined to be 20 degrees clockwise, or +20 degrees
  • the center line of the three-dimensional cylindrical image is taken as the axis, and the three-dimensional cylindrical image is smoothed.
  • the hour hand turns 20 degrees.
  • Fig. 8 is a schematic diagram showing the transformation of the three-dimensional cylindrical image at different angles.
  • the method may further include:
  • the depth of field of the three-dimensional cylindrical image is adjusted to the target depth of field.
  • the display screen included in the electronic device or the display device connected to the electronic device may be a touch screen, and the user may send a zoom instruction by making a gesture on the touch screen, for example, if the electronic device detects that the user pinches on the touch screen The gesture indicates that the zoom-out instruction is received, and if the gesture of the user's finger separation on the touch screen is detected, it indicates that the zoom-in instruction is received.
  • the image is reduced, that is, the image is far away from the angle of view, the depth of field becomes larger, the image is enlarged, that is, the distance between the image and the angle of view becomes closer, and the depth of field becomes smaller;
  • the specific correspondence between the gesture and the command content can be set according to the actual situation, for example, the finger pinch can be set.
  • the correspondence between the amplitude and the depth of field is large, and the correspondence between the amplitude of the finger separation and the depth of field is small, and so on, and is not limited.
  • Fig. 9 is a schematic diagram showing the transformation of different depths of a three-dimensional cylindrical image.
  • an intermediate process of adjusting the depth of field may be displayed on a display screen of the electronic device or a display device connected to the electronic device.
  • the timer may be started, and the zoom is determined. duration;
  • the transition depth of field corresponding to the stored time value is calculated, wherein each time value greater than or equal to 0 and less than the zoom duration corresponds to a transition depth of field, and the transition depth of field is located at the current depth of field of the three-dimensional cylindrical image and the target Between the depths of field; adjusting the depth of field of the three-dimensional cylindrical image to the transition depth of field;
  • the depth of field of the three-dimensional cylindrical image is adjusted to the target depth of field.
  • the zoom duration is the length of time from the receipt of the zoom command to the end of the zoom.
  • the zoom duration can be preset; or the zoom duration can be determined based on the zoom command.
  • the execution subject is a touch screen device, and the zoom instruction may be a user gesture, and the zoom duration is determined according to the magnitude of the user gesture amplitude.
  • the depth of field adjustment process is within 1 second after receiving the zoom instruction, and the depth of field in this process is referred to as the transition depth of field, and the transition depth at each moment in the depth of field adjustment process is different.
  • the transition depth of field the stored time value / the zoom duration * (target depth of field - the current depth of field of the three-dimensional cylindrical image) + the current depth of field of the three-dimensional cylindrical image.
  • the method may further include:
  • the three-dimensional cylindrical image is adjusted according to the determined viewpoint angle and depth of field.
  • the depth of field and the angle of the viewpoint usually change.
  • the specific correspondence between the gesture and the command content can be set according to the actual situation. For example, the relationship between the amplitude of the upward sliding and the change of the depth of field and the angle of the viewpoint can be set, and the downward relationship can be set.
  • the corresponding relationship between the amplitude of the sliding and the change of the depth of field and the angle of the viewpoint, etc., is not limited in detail.
  • the viewpoint angle and the depth of field to be reached are determined; the viewpoint angle of the three-dimensional cylindrical image is adjusted to the determined viewpoint angle, and the depth of field of the three-dimensional cylindrical image is adjusted to the determined depth of field.
  • the initial depth of field (h / 2) / [tan (fov / 2)], fov represents the field of view
  • the field of view can be set according to the actual situation, for example, can be set between 120 degrees and 180 degrees The value.
  • the process of determining the mapping relationship and the process of mapping the image according to the mapping relationship may be performed in a GPU (Graphics Processing Unit), thereby improving the calculation speed and reducing the CPU usage. .
  • a GPU Graphics Processing Unit
  • the method may further include:
  • the expanded edge line can be as shown in Fig. 6. It can be understood that if there is a portrait at the position where the expanded edge line is located, the portrait image is split into two parts in the expanded plane image, and the display effect is poor.
  • the area where the edge line is expanded is copied, and the copied image is added to the expanded surface image. If there is a portrait at the position where the edge line is expanded, the area where the portrait is located is copied, and the image is copied. It is added to the expansion surface image.
  • a copy image can be added to each edge position of the expansion surface image, so that both edge positions of the expansion surface image are complete portraits, which improves the display effect.
  • a contoured image is mapped to a corresponding position in the three-dimensional cylindrical image as a center line, and an image area of a preset size is determined, the area is copied, and the copy area is separately added to the left and right sides of the expanded image.
  • determining the position (the expanded edge line is mapped to the corresponding position in the three-dimensional cylindrical image) to the left within the preset distance, copying the area, and adding the copied area to the right edge of the expanded image, determining The position is preset to the right within the distance, the area is copied, and the copied area is added to the left edge of the expanded-surface image.
  • the embodiment of the present application further provides a fisheye image processing apparatus.
  • the apparatus includes:
  • the obtaining module 1001 is configured to obtain a fisheye image to be processed
  • the first mapping module 1002 is configured to map the image of the fisheye to be processed onto the three-dimensional cylindrical surface according to a mapping relationship between the preset fisheye image coordinate point and the three-dimensional cylindrical coordinate point, to obtain a three-dimensional cylindrical image;
  • the second mapping module 1003 is configured to map the three-dimensional cylindrical image according to a mapping relationship between a preset three-dimensional cylindrical coordinate point and a developed surface image coordinate point after receiving the cylindrical surface expansion command, to obtain a developed surface image.
  • the second mapping module 1003 may be specifically configured to:
  • the three-dimensional cylindrical image is mapped according to the second mapping relationship corresponding to the time, to obtain the time expansion surface image;
  • the three-dimensional cylindrical image is mapped according to the first mapping relationship to obtain the target expansion surface image.
  • the second mapping module 1003 may include: a timing submodule, a first determining submodule, a determining submodule, a first mapping submodule, and a second mapping submodule (not shown), where
  • timing sub-module configured to start a timer after receiving a cylindrical expansion command, and determine an expansion time
  • a first determining submodule configured to determine a time value stored in the timer at a current moment
  • a determining sub-module configured to determine whether the stored time value is less than the expansion time; if not, triggering the first mapping sub-module, if greater than or equal to, triggering the second mapping sub-module;
  • a first mapping sub-module configured to map the three-dimensional cylindrical image according to a third mapping relationship corresponding to the stored time value, to obtain an expanded surface image corresponding to the stored time value; wherein, greater than or equal to 0 and less than Each time value of the expansion time length corresponds to a third mapping relationship, and a third mapping relationship is: a mapping relationship between the coordinate points of the three-dimensional cylindrical coordinate points and the expanded surface image corresponding to a time value;
  • the second mapping sub-module is configured to map the three-dimensional cylindrical image according to a mapping relationship between the preset three-dimensional cylindrical coordinate points and the developed planar image coordinate points, to obtain an expanded planar image.
  • the coordinate values of the three-dimensional cylindrical coordinate points include: a first coordinate value, a second coordinate value, and a third coordinate value
  • the coordinate values of the developed curved surface image coordinate points corresponding to the one time value include: Four coordinate values, fifth coordinate values, and sixth coordinate values
  • the first mapping submodule is specifically configured to:
  • the mapped sixth coordinate value is calculated according to the third coordinate value, the radius of the three-dimensional cylinder, and the ratio.
  • the first mapping submodule is specifically configured to:
  • the fourth coordinate value to be mapped the first coordinate value + the ratio * [sign (first coordinate value) * the arc length between the first coordinate value and the preset reference point - the first coordinate value];
  • An arc length between the first coordinate value and a preset reference point a radius of the three-dimensional cylinder * ( ⁇ - viewpoint angle);
  • the viewpoint angle tan -1 (absolute value of the first coordinate value / third coordinate value);
  • the sixth coordinate value to be mapped the third coordinate value + the ratio * (- the radius of the three-dimensional cylinder - the third coordinate value).
  • the coordinate value of the three-dimensional cylindrical coordinate point includes: a first coordinate value, a second coordinate value, and a third coordinate value
  • the coordinate value of the developed planar image coordinate point includes: a seventh coordinate value, Eight coordinate values and ninth coordinate values
  • the second mapping submodule may be specifically configured to:
  • the inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
  • the second mapping submodule may be specifically configured to:
  • a seventh coordinate value sign (first coordinate value)* an arc length between the first coordinate value and the preset reference point;
  • An arc length between the first coordinate value and a preset reference point a radius of the three-dimensional cylinder * ( ⁇ - viewpoint angle);
  • the viewpoint angle tan -1 (absolute value of the first coordinate value / third coordinate value);
  • the inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
  • the device may further include: a first receiving module, a first determining module, and a rotating module (not shown), wherein
  • a first receiving module configured to receive a rotating cylinder command sent by a user
  • a first determining module configured to determine a rotation angle corresponding to the rotating cylinder instruction
  • a rotation module configured to rotate the three-dimensional cylindrical image by the rotation angle by using a center line of the three-dimensional cylindrical image as an axis.
  • the device may further include: a second receiving module, a second determining module, and a first adjusting module (not shown), where
  • a second receiving module configured to receive a viewpoint moving instruction sent by the user
  • a second determining module configured to determine a viewpoint angle and a depth of field corresponding to the viewpoint moving instruction
  • the first adjustment module is configured to adjust the three-dimensional cylindrical image according to the determined viewpoint angle and depth of field.
  • the device may further include: a third receiving module, a third determining module, and a second adjusting module (not shown), where
  • a third receiving module configured to receive a scaling instruction sent by the user
  • a third determining module configured to determine a target depth of field corresponding to the scaling instruction
  • a second adjustment module configured to adjust a depth of field of the three-dimensional cylindrical image to the target depth of field.
  • the device may further include: a timing module, a fourth determining module, a determining module, a third adjusting module, and a fourth adjusting module (not shown), where
  • a timing module configured to start a timer after receiving a zoom instruction sent by the user, and determine a zoom duration
  • a fourth determining module configured to determine a time value stored in the timer at a current moment
  • a judging module configured to determine whether the stored time value is less than the zooming time length; if not, triggering the third adjusting module, if greater than or equal to, triggering the fourth adjusting module;
  • the third adjustment module includes: a calculation submodule and an adjustment submodule,
  • a calculation sub-module configured to calculate a transition depth of field corresponding to the stored time value, wherein each time value greater than or equal to 0 and smaller than the second preset value corresponds to a transition depth of field, and the transition depth of field is located in the three-dimensional cylindrical image When the foreground is deep and the target depth of field;
  • a fourth adjustment module configured to adjust a depth of field of the three-dimensional cylindrical image to the target depth of field.
  • the calculating submodule may be specifically used to:
  • Transition Depth of Field stored time value / said zoom duration * (target depth of field - current depth of field of the 3D cylindrical image) + current depth of field of the 3D cylindrical image.
  • the apparatus may further include: a fifth determining module, a sixth determining module, a copying module, and an adding module (not shown), where
  • a fifth determining module configured to determine, according to the mapping relationship, that an expanded edge line of the expanded plane image is mapped to a corresponding position in the three-dimensional cylindrical image
  • a sixth determining module configured to determine an area where the location is located in the three-dimensional cylindrical image according to a preset area dividing rule
  • a copy module for copying the determined area to obtain a duplicate image
  • a adding module configured to add the duplicate image to the expanded plane image according to the mapping relationship.
  • the fisheye image is mapped onto the three-dimensional cylindrical surface to obtain a three-dimensional cylindrical image, and after receiving the cylindrical surface expansion instruction, the three-dimensional cylindrical image is mapped to obtain a developed surface image; in the scheme, three-dimensional
  • the visual effect of the cylindrical image is better than that of the hemisphere image, and if the user wants to see the image area of the back view, there is no need to manually rotate the three-dimensional cylinder, and only need to send a cylindrical expansion command to see the expansion surface image, the expansion surface
  • the image contains an image area with a large viewing angle, thus improving the image display effect.
  • the embodiment of the present application further provides an electronic device, as shown in FIG. 11, including a processor 1101 and a memory 1102.
  • a memory 1102 configured to store a computer program
  • the processor 1101 is configured to implement any of the above-described fisheye image processing methods when executing the program stored on the memory 1102.
  • the memory mentioned in the above electronic device may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
  • NVM non-volatile memory
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • the above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or may be a digital signal processing (DSP), dedicated integration.
  • CPU central processing unit
  • NP network processor
  • DSP digital signal processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, implements any of the above-described fisheye image processing methods.
  • the embodiment of the present application also provides an executable program code for being executed to execute any of the above-described fisheye image processing methods.
  • the fisheye image processing device embodiment shown in FIG. 10 the electronic device embodiment shown in FIG. 11, the computer readable storage medium embodiment, and the above-described executable program code embodiment are basically similar.
  • the description is relatively simple, and the relevant parts can be referred to the description of the embodiment of the fisheye image processing method shown in FIG. 1-9.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

Embodiments of the present application provide a fisheye image processing method and apparatus, and an electronic device. The method comprises: mapping a fisheye image onto a three-dimensional cylindrical surface to obtain a three-dimensional cylindrical image; and after receiving a cylindrical surface unfolding instruction, mapping the three-dimensional cylindrical image to obtain an image of an unfolded surface. In the present solution, if a user wants to see an image area at a back viewing angle, the image of the unfolded surface can be seen simply by sending a cylindrical surface unfolding instruction without the need for manually rotating a three-dimensional cylinder, the image of the unfolded surface comprising the image area at a large viewing angle, and therefore, the image display effect is improved.

Description

一种鱼眼图像处理方法、装置及电子设备Fisheye image processing method, device and electronic device
本申请要求于2017年11月20日提交中国专利局、申请号为201711156272.0、发明名称为“一种鱼眼图像处理方法、装置及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 200911156272.0, entitled "A Fisheye Image Processing Method, Apparatus, and Electronic Device", filed on November 20, 2017, the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本申请涉及图像处理技术领域,特别是涉及一种鱼眼图像处理方法、装置及电子设备。The present application relates to the field of image processing technologies, and in particular, to a fisheye image processing method, apparatus, and electronic device.
背景技术Background technique
目前,鱼眼图像由于其超大视角得到了广泛应用。目前,对鱼眼图像进行处理的方案一般包括:预先设定鱼眼图像坐标系与三维半球坐标系的映射关系,根据该映射关系,将采集到的鱼眼图像映射到三维半球面上,得到具有立体效果的三维图像,这样的三维半球图像存在图像形变,视觉效果较差。At present, fisheye images have been widely used due to their large viewing angles. At present, the solution for processing the fisheye image generally includes: presetting the mapping relationship between the fisheye image coordinate system and the three-dimensional hemispherical coordinate system, and mapping the acquired fisheye image onto the three-dimensional hemispherical surface according to the mapping relationship, A three-dimensional image with a three-dimensional effect, such a three-dimensional hemispherical image has image deformation, and the visual effect is poor.
上述方案中,得到三维图像后,仅能向用户展示该三维半球正面视角的三维图像区域,如果用户想要看到该三维半球背面视角的图像区域,只能手动转动该三维半球,展示效果较差。In the above solution, after the three-dimensional image is obtained, only the three-dimensional image area of the front view of the three-dimensional hemisphere can be displayed to the user. If the user wants to see the image area of the back view of the three-dimensional hemisphere, the three-dimensional hemisphere can only be manually rotated, and the display effect is better. difference.
发明内容Summary of the invention
本申请实施例的目的在于提供一种鱼眼图像处理方法、装置及电子设备,以提高视觉效果和展示效果。An object of the embodiments of the present application is to provide a fisheye image processing method, apparatus, and electronic device to improve visual effects and display effects.
为达到上述目的,本申请实施例提供一种鱼眼图像处理方法,包括:To achieve the above objective, an embodiment of the present application provides a fisheye image processing method, including:
获取待处理鱼眼图像;Obtaining a fisheye image to be processed;
根据预先设定的鱼眼图像坐标点与三维圆柱坐标点的映射关系,将所述待处理鱼眼图像映射到三维圆柱面上,得到三维圆柱图像;According to a mapping relationship between a preset fisheye image coordinate point and a three-dimensional cylindrical coordinate point, the fisheye image to be processed is mapped onto the three-dimensional cylindrical surface to obtain a three-dimensional cylindrical image;
在接收到圆柱面展开指令后,根据预先设定的三维圆柱坐标点与展开面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开面图像。After receiving the cylindrical surface expansion command, the three-dimensional cylindrical image is mapped according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed surface image coordinate point to obtain a developed surface image.
可选的,所述在接收到圆柱面展开指令后,根据预先设定的三维圆柱坐标点与展开面图像坐标点的映射关系,将所述三维圆柱图像映射到展开面上,得到展开面图像,可以包括:Optionally, after receiving the cylindrical surface expansion instruction, mapping the three-dimensional cylindrical image to the expansion surface according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the expansion surface image coordinate point, and obtaining the expansion surface image Can include:
在接收到圆柱面展开指令后,确定展开时长、以及目标展开面图像与所述三维圆柱图像的第一映射关系;After receiving the cylindrical surface expansion instruction, determining an expansion duration, and a first mapping relationship between the target expansion surface image and the three-dimensional cylindrical image;
根据所述展开时长、以及所述第一映射关系,确定到达所述展开时长之前的每一时刻展开面图像与所述三维圆柱图像的第二映射关系;Determining, according to the expansion duration and the first mapping relationship, a second mapping relationship between the expansion surface image and the three-dimensional cylindrical image at each time before reaching the expansion duration;
针对到达所述展开时长之前的每一时刻,根据该时刻对应的第二映射关系,将所述三维圆柱图像进行映射,得到该时刻展开面图像;For each time before the expansion time is reached, the three-dimensional cylindrical image is mapped according to the second mapping relationship corresponding to the time, to obtain the time expansion surface image;
到达所述展开时长时,根据所述第一映射关系,将所述三维圆柱图像进行映射,得到所述目标展开面图像。When the expansion time is reached, the three-dimensional cylindrical image is mapped according to the first mapping relationship to obtain the target expansion surface image.
可选的,所述在接收到圆柱面展开指令后,根据预先设定的三维圆柱坐标点与展开面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开面图像,可以包括:Optionally, after receiving the cylindrical surface expansion instruction, the three-dimensional cylindrical image is mapped according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed surface image coordinate point, and the expanded surface image is obtained, which may include :
在接收到圆柱面展开指令后,启动计时器,并确定展开时长;After receiving the cylindrical expansion command, start the timer and determine the expansion time;
确定当前时刻下所述计时器中存储的时间值;Determining a time value stored in the timer at the current moment;
判断所存储的时间值是否小于所述展开时长;Determining whether the stored time value is less than the expansion time;
如果小于,根据所存储的时间值对应的第三映射关系,将所述三维圆柱图像进行映射,得到所存储的时间值对应的展开曲面图像;其中,大于等于0且小于所述展开时长的每个时间值分别对应一份第三映射关系,一份第三映射关系为:三维圆柱坐标点与一个时间值对应的展开曲面图像坐标点的映射关系;If the value is smaller than the third mapping relationship corresponding to the stored time value, the three-dimensional cylindrical image is mapped to obtain an expanded surface image corresponding to the stored time value; wherein, each of the expansion time is greater than or equal to 0 The time values respectively correspond to a third mapping relationship, and a third mapping relationship is: a mapping relationship between the three-dimensional cylindrical coordinate points and a coordinate value of the expanded curved image corresponding to a time value;
如果大于等于,根据预先设定的三维圆柱坐标点与展开平面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开平面图像。If it is greater than or equal to, the three-dimensional cylindrical image is mapped according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed planar image coordinate point, and an expanded planar image is obtained.
可选的,所述三维圆柱坐标点的坐标值包括:第一坐标值、第二坐标值和第三坐标值,所述一个时间值对应的展开曲面图像坐标点的坐标值包括:第四坐标值、第五坐标值和第六坐标值;Optionally, the coordinate value of the three-dimensional cylindrical coordinate point includes: a first coordinate value, a second coordinate value, and a third coordinate value, where coordinate values of the expanded surface image coordinate point corresponding to the one time value include: fourth coordinate a value, a fifth coordinate value, and a sixth coordinate value;
所述根根据所存储的时间值对应的第三映射关系,将所述三维圆柱图像进行映射,可以包括:Mapping the three-dimensional cylindrical image according to the third mapping relationship corresponding to the stored time value may include:
针对所存储的每一时间值,计算该时间值与所述展开时长的比值;Calculating a ratio of the time value to the expansion time for each stored time value;
根据所述第一坐标值、所述第一坐标值与预设基准点之间的弧长以及所述比值,计算所映射到的第四坐标值;其中,所述弧长根据视点角度及所述三维圆柱的半径确定;Calculating the mapped fourth coordinate value according to the first coordinate value, the arc length between the first coordinate value and the preset reference point, and the ratio; wherein the arc length is according to the viewpoint angle and the Determining the radius of the three-dimensional cylinder;
将所述第二坐标值确定为所映射到的第五坐标值;Determining the second coordinate value as the fifth coordinate value to be mapped;
根据所述第三坐标值、所述三维圆柱的半径以及所述比值,计算所映射到的第六坐标值。The mapped sixth coordinate value is calculated according to the third coordinate value, the radius of the three-dimensional cylinder, and the ratio.
可选的,所述根据所述第一坐标值、所述第一坐标值与预设基准点之间的弧长以及所述比值,计算所映射到的第四坐标值,可以包括:Optionally, the calculating the mapped fourth coordinate value according to the first coordinate value, the arc length between the first coordinate value and the preset reference point, and the ratio may include:
所映射到的第四坐标值=第一坐标值+所述比值*[sign(第一坐标值)*所述第一坐标值与预设基准点之间的弧长-第一坐标值];The fourth coordinate value to be mapped = the first coordinate value + the ratio * [sign (first coordinate value) * the arc length between the first coordinate value and the preset reference point - the first coordinate value];
所述第一坐标值与预设基准点之间的弧长=所述三维圆柱的半径*(π-视点角度);An arc length between the first coordinate value and a preset reference point = a radius of the three-dimensional cylinder * (π - viewpoint angle);
所述视点角度=tan -1(第一坐标值的绝对值/第三坐标值); The viewpoint angle = tan -1 (absolute value of the first coordinate value / third coordinate value);
所述根据所述第三坐标值、所述三维圆柱的半径以及所述比值,计算所映射到的第六坐标值,可以包括:The calculating the mapped sixth coordinate value according to the third coordinate value, the radius of the three-dimensional cylinder, and the ratio may include:
所映射到的第六坐标值=第三坐标值+所述比值*(-所述三维圆柱的半径-第三坐标值)。The sixth coordinate value to be mapped = the third coordinate value + the ratio * (- the radius of the three-dimensional cylinder - the third coordinate value).
可选的,所述三维圆柱坐标点的坐标值包括:第一坐标值、第二坐标值和第三坐标值,所述展开平面图像坐标点的坐标值包括:第七坐标值、第八坐标值和第九坐标值;Optionally, the coordinate value of the three-dimensional cylindrical coordinate point includes: a first coordinate value, a second coordinate value, and a third coordinate value, where the coordinate value of the developed planar image coordinate point includes: a seventh coordinate value, an eighth coordinate Value and ninth coordinate value;
所述根据预先设定的三维圆柱坐标点与展开平面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开平面图像,可以包括:And mapping the three-dimensional cylindrical image according to the mapping relationship between the preset three-dimensional cylindrical coordinate point and the expanded planar image coordinate point, and obtaining the expanded planar image, which may include:
根据所述第一坐标值、以及所述第一坐标值与预设基准点之间的弧长,计算所映射到的第七坐标值;其中,所述弧长根据视点角度及所述三维圆柱的半径确定;Calculating the mapped seventh coordinate value according to the first coordinate value and an arc length between the first coordinate value and the preset reference point; wherein the arc length is according to the viewpoint angle and the three-dimensional cylinder Radius determination;
将所述第二坐标值确定为所映射到的第八坐标值;Determining the second coordinate value as the eighth coordinate value to be mapped;
将所述三维圆柱的半径的相反数确定为映射到的第九坐标值。The inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
可选的,所述根据所述第一坐标值、以及所述第一坐标值与预设基准点之间的弧长,计算所映射到的第七坐标值,可以包括:Optionally, the calculating the mapped seventh coordinate value according to the first coordinate value and the arc length between the first coordinate value and the preset reference point may include:
第七坐标值=sign(第一坐标值)*所述第一坐标值与预设基准点之间的弧长;a seventh coordinate value=sign (first coordinate value)* an arc length between the first coordinate value and the preset reference point;
所述第一坐标值与预设基准点之间的弧长=所述三维圆柱的半径*(π-视点角度);An arc length between the first coordinate value and a preset reference point = a radius of the three-dimensional cylinder * (π - viewpoint angle);
所述视点角度=tan -1(第一坐标值的绝对值/第三坐标值)。 The viewpoint angle = tan -1 (absolute value of the first coordinate value / third coordinate value).
可选的,在所述得到三维圆柱图像之后,还可以包括:Optionally, after the obtaining the three-dimensional cylindrical image, the method further includes:
接收用户发送的转动圆柱指令;确定所述转动圆柱指令对应的转动角度;以所述三维圆柱图像的中心线为轴,将所述三维圆柱图像转动所述转动角度;Receiving a rotation cylinder command sent by the user; determining a rotation angle corresponding to the rotation cylinder instruction; rotating the three-dimensional cylinder image by the rotation angle by using a center line of the three-dimensional cylindrical image as an axis;
或者,or,
接收用户发送的视点移动指令;确定所述视点移动指令对应的视点角度与景深;根据所确定的视点角度与景深,对所述三维圆柱图像的进行调整。Receiving a viewpoint movement instruction sent by the user; determining a viewpoint angle and a depth of field corresponding to the viewpoint movement instruction; and adjusting the three-dimensional cylindrical image according to the determined viewpoint angle and depth of field.
可选的,在所述得到三维圆柱图像之后,还可以包括:Optionally, after the obtaining the three-dimensional cylindrical image, the method further includes:
接收用户发送的缩放指令;Receiving a zoom instruction sent by the user;
确定所述缩放指令对应的目标景深;Determining a target depth of field corresponding to the scaling instruction;
将所述三维圆柱图像的景深调整至所述目标景深。The depth of field of the three-dimensional cylindrical image is adjusted to the target depth of field.
可选的,在接收用户发送的缩放指令后,还可以包括:Optionally, after receiving the scaling instruction sent by the user, the method further includes:
启动计时器,并确定缩放时长;Start the timer and determine the zoom duration;
所述将所述三维圆柱图像的景深调整至所述目标景深,可以包括:The adjusting the depth of field of the three-dimensional cylindrical image to the target depth of field may include:
确定当前时刻下所述计时器中存储的时间值;Determining a time value stored in the timer at the current moment;
判断所存储的时间值是否小于所述缩放时长;Determining whether the stored time value is less than the scaling time;
如果小于,计算所存储的时间值对应的过渡景深,其中,大于等于0且小于所述缩放时长的每一时间值对应一过渡景深,过渡景深位于所述三维圆柱图像的当前景深与所述目标景深之间;将所述三维圆柱图像的景深调整至所述过渡景深;If the value is less than, the transition depth of field corresponding to the stored time value is calculated, wherein each time value greater than or equal to 0 and less than the zoom duration corresponds to a transition depth of field, and the transition depth of field is located at the current depth of field of the three-dimensional cylindrical image and the target Between the depths of field; adjusting the depth of field of the three-dimensional cylindrical image to the transition depth of field;
如果大于等于,将所述三维圆柱图像的景深调整至所述目标景深。If it is greater than or equal to, the depth of field of the three-dimensional cylindrical image is adjusted to the target depth of field.
可选的,所述计算所存储的时间值对应的过渡景深,可以包括:Optionally, the calculating the transition depth of field corresponding to the stored time value may include:
过渡景深=所存储的时间值/所述缩放时长*(目标景深-三维圆柱图像的当前景深)+三维圆柱图像的当前景深。Transition Depth of Field = stored time value / said zoom duration * (target depth of field - current depth of field of the 3D cylindrical image) + current depth of field of the 3D cylindrical image.
可选的,在所述根据预先设定的三维圆柱坐标点与展开面图像坐标点的映射关系,将所述三维圆柱图像映射到展开面上,得到展开面图像之后,还包括:Optionally, after mapping the three-dimensional cylindrical image to the expansion surface according to the mapping relationship between the preset three-dimensional cylindrical coordinate point and the expansion surface image coordinate point, and obtaining the expansion surface image, the method further includes:
根据所述映射关系,确定所述展开面图像的展开边缘线映射到所述三维圆柱图像中对应的位置;Determining, according to the mapping relationship, that the expanded edge line of the expanded plane image is mapped to a corresponding position in the three-dimensional cylindrical image;
根据预设区域划分规则,在所述三维圆柱图像中,确定所述位置所在的区域;Determining, in the three-dimensional cylindrical image, an area in which the location is located according to a preset area division rule;
对所确定的区域进行复制,得到复制图像;Copying the determined area to obtain a duplicate image;
根据所述映射关系,将所述复制图像添加到所述展开面图像中。The duplicate image is added to the expanded plane image according to the mapping relationship.
为达到上述目的,本申请实施例还提供一种鱼眼图像处理装置,其特征在于,所述装置包括:In order to achieve the above objective, an embodiment of the present application further provides a fisheye image processing apparatus, wherein the apparatus includes:
获取模块,用于获取待处理鱼眼图像;Obtaining a module, configured to obtain a fisheye image to be processed;
第一映射模块,用于根据预先设定的鱼眼图像坐标点与三维圆柱坐标点的映射关系,将所述待处理鱼眼图像映射到三维圆柱面上,得到三维圆柱图像;a first mapping module, configured to map the image of the fisheye to be processed to a three-dimensional cylindrical surface according to a mapping relationship between a preset fisheye image coordinate point and a three-dimensional cylindrical coordinate point, to obtain a three-dimensional cylindrical image;
第二映射模块,用于在接收到圆柱面展开指令后,根据预先设定的三维圆柱坐标点与展开面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开面图像。The second mapping module is configured to map the three-dimensional cylindrical image according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed surface image coordinate point after receiving the cylindrical surface expansion instruction, to obtain a developed surface image.
可选的,所述第二映射模块,具体可以用于:Optionally, the second mapping module is specifically configured to:
在接收到圆柱面展开指令后,确定展开时长、以及目标展开面图像与所述三维圆柱图像的第一映射关系;After receiving the cylindrical surface expansion instruction, determining an expansion duration, and a first mapping relationship between the target expansion surface image and the three-dimensional cylindrical image;
根据所述展开时长、以及所述第一映射关系,确定到达所述展开时长之前的每一时刻展开面图像与所述三维圆柱图像的第二映射关系;Determining, according to the expansion duration and the first mapping relationship, a second mapping relationship between the expansion surface image and the three-dimensional cylindrical image at each time before reaching the expansion duration;
针对到达所述展开时长之前的每一时刻,根据该时刻对应的第二映射关系,将所述三维圆柱图像进行映射,得到该时刻展开面图像;For each time before the expansion time is reached, the three-dimensional cylindrical image is mapped according to the second mapping relationship corresponding to the time, to obtain the time expansion surface image;
到达所述展开时长时,根据所述第一映射关系,将所述三维圆柱图像进行映射,得到所述目标展开面图像。When the expansion time is reached, the three-dimensional cylindrical image is mapped according to the first mapping relationship to obtain the target expansion surface image.
可选的,所述第二映射模块,可以包括:Optionally, the second mapping module may include:
计时子模块,用于在接收到圆柱面展开指令后,启动计时器,并确定展开时长;a timing sub-module, configured to start a timer after receiving a cylindrical expansion command, and determine an expansion time;
第一确定子模块,用于确定当前时刻下所述计时器中存储的时间值;a first determining submodule, configured to determine a time value stored in the timer at a current moment;
判断子模块,用于判断所存储的时间值是否小于所述展开时长;如果小于,触发第一映射子模块,如果大于等于,触发第二映射子模块;a determining sub-module, configured to determine whether the stored time value is less than the expansion time; if not, triggering the first mapping sub-module, if greater than or equal to, triggering the second mapping sub-module;
第一映射子模块,用于根据所存储的时间值对应的第三映射关系,将所述三维圆柱图像进行映射,得到所存储的时间值对应的展开曲面图像;其中,大于等于0且小于所述展开时长的每个时间值分别对应一份第三映射关系,一份第三映射关系为:三维圆柱坐标点与一个时间值对应的展开曲面图像坐标点的映射关系;a first mapping sub-module, configured to map the three-dimensional cylindrical image according to a third mapping relationship corresponding to the stored time value, to obtain an expanded surface image corresponding to the stored time value; wherein, greater than or equal to 0 and less than Each time value of the expansion time length corresponds to a third mapping relationship, and a third mapping relationship is: a mapping relationship between the coordinate points of the three-dimensional cylindrical coordinate points and the expanded surface image corresponding to a time value;
第二映射子模块,用于根据预先设定的三维圆柱坐标点与展开平面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开平面图像。The second mapping sub-module is configured to map the three-dimensional cylindrical image according to a mapping relationship between the preset three-dimensional cylindrical coordinate points and the developed planar image coordinate points, to obtain an expanded planar image.
可选的,所述三维圆柱坐标点的坐标值包括:第一坐标值、第二坐标值和第三坐标值,所述一个时间值对应的展开曲面图像坐标点的坐标值包括: 第四坐标值、第五坐标值和第六坐标值;Optionally, the coordinate value of the three-dimensional cylindrical coordinate point includes: a first coordinate value, a second coordinate value, and a third coordinate value, where coordinate values of the expanded surface image coordinate point corresponding to the one time value include: a fourth coordinate a value, a fifth coordinate value, and a sixth coordinate value;
所述第一映射子模块,具体可以用于:The first mapping submodule may be specifically configured to:
针对所存储的每一时间值,计算该时间值与所述展开时长的比值;Calculating a ratio of the time value to the expansion time for each stored time value;
根据所述第一坐标值、所述第一坐标值与预设基准点之间的弧长以及所述比值,计算所映射到的第四坐标值;其中,所述弧长根据视点角度及所述三维圆柱的半径确定;Calculating the mapped fourth coordinate value according to the first coordinate value, the arc length between the first coordinate value and the preset reference point, and the ratio; wherein the arc length is according to the viewpoint angle and the Determining the radius of the three-dimensional cylinder;
将所述第二坐标值确定为所映射到的第五坐标值;Determining the second coordinate value as the fifth coordinate value to be mapped;
根据所述第三坐标值、所述三维圆柱的半径以及所述比值,计算所映射到的第六坐标值。The mapped sixth coordinate value is calculated according to the third coordinate value, the radius of the three-dimensional cylinder, and the ratio.
可选的,所述第一映射子模块,具体可以用于:Optionally, the first mapping submodule is specifically configured to:
针对所存储的每一时间值,计算该时间值与所述展开时长的比值;Calculating a ratio of the time value to the expansion time for each stored time value;
利用如下算式,进行计算:Calculate using the following formula:
所映射到的第四坐标值=第一坐标值+所述比值*[sign(第一坐标值)*所述第一坐标值与预设基准点之间的弧长-第一坐标值];The fourth coordinate value to be mapped = the first coordinate value + the ratio * [sign (first coordinate value) * the arc length between the first coordinate value and the preset reference point - the first coordinate value];
所述第一坐标值与预设基准点之间的弧长=所述三维圆柱的半径*(π-视点角度);An arc length between the first coordinate value and a preset reference point = a radius of the three-dimensional cylinder * (π - viewpoint angle);
所述视点角度=tan -1(第一坐标值的绝对值/第三坐标值); The viewpoint angle = tan -1 (absolute value of the first coordinate value / third coordinate value);
将所述第二坐标值确定为所映射到的第五坐标值;Determining the second coordinate value as the fifth coordinate value to be mapped;
所映射到的第六坐标值=第三坐标值+所述比值*(-所述三维圆柱的半径-第三坐标值)。The sixth coordinate value to be mapped = the third coordinate value + the ratio * (- the radius of the three-dimensional cylinder - the third coordinate value).
可选的,所述三维圆柱坐标点的坐标值包括:第一坐标值、第二坐标值和第三坐标值,所述展开平面图像坐标点的坐标值包括:第七坐标值、第八坐标值和第九坐标值;Optionally, the coordinate value of the three-dimensional cylindrical coordinate point includes: a first coordinate value, a second coordinate value, and a third coordinate value, where the coordinate value of the developed planar image coordinate point includes: a seventh coordinate value, an eighth coordinate Value and ninth coordinate value;
所述第二映射子模块,具体可以用于:The second mapping submodule may be specifically configured to:
根据所述第一坐标值、以及所述第一坐标值与预设基准点之间的弧长,计算所映射到的第七坐标值;其中,所述弧长根据视点角度及所述三维圆柱的半径确定;Calculating the mapped seventh coordinate value according to the first coordinate value and an arc length between the first coordinate value and the preset reference point; wherein the arc length is according to the viewpoint angle and the three-dimensional cylinder Radius determination;
将所述第二坐标值确定为所映射到的第八坐标值;Determining the second coordinate value as the eighth coordinate value to be mapped;
将所述三维圆柱的半径的相反数确定为映射到的第九坐标值。The inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
可选的,所述第二映射子模块,具体可以用于:利用如下算式,进行计算:Optionally, the second mapping sub-module may be specifically configured to: perform calculation by using the following formula:
第七坐标值=sign(第一坐标值)*所述第一坐标值与预设基准点之间的弧长;a seventh coordinate value=sign (first coordinate value)* an arc length between the first coordinate value and the preset reference point;
所述第一坐标值与预设基准点之间的弧长=所述三维圆柱的半径*(π-视点角度);An arc length between the first coordinate value and a preset reference point = a radius of the three-dimensional cylinder * (π - viewpoint angle);
所述视点角度=tan -1(第一坐标值的绝对值/第三坐标值); The viewpoint angle = tan -1 (absolute value of the first coordinate value / third coordinate value);
将所述第二坐标值确定为所映射到的第八坐标值;Determining the second coordinate value as the eighth coordinate value to be mapped;
将所述三维圆柱的半径的相反数确定为映射到的第九坐标值。The inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
可选的,所述装置还包括:第一接收模块、第一确定模块和转动模块,或者,所述装置还包括:第二接收模块、第二确定模块和第一调整模块,其中,Optionally, the device further includes: a first receiving module, a first determining module, and a rotating module, or the device further includes: a second receiving module, a second determining module, and a first adjusting module, where
第一接收模块,用于接收用户发送的转动圆柱指令;a first receiving module, configured to receive a rotating cylinder command sent by a user;
第一确定模块,用于确定所述转动圆柱指令对应的转动角度;a first determining module, configured to determine a rotation angle corresponding to the rotating cylinder instruction;
转动模块,用于以所述三维圆柱图像的中心线为轴,将所述三维圆柱图像转动所述转动角度;a rotation module, configured to rotate the three-dimensional cylindrical image by the rotation angle by using a center line of the three-dimensional cylindrical image as an axis;
第二接收模块,用于接收用户发送的视点移动指令;a second receiving module, configured to receive a viewpoint moving instruction sent by the user;
第二确定模块,用于确定所述视点移动指令对应的视点角度与景深;a second determining module, configured to determine a viewpoint angle and a depth of field corresponding to the viewpoint moving instruction;
第一调整模块,用于根据所确定的视点角度与景深,对所述三维圆柱图像的进行调整。The first adjustment module is configured to adjust the three-dimensional cylindrical image according to the determined viewpoint angle and depth of field.
可选的,所述装置还可以包括:Optionally, the device may further include:
第三接收模块,用于接收用户发送的缩放指令;a third receiving module, configured to receive a scaling instruction sent by the user;
第三确定模块,用于确定所述缩放指令对应的目标景深;a third determining module, configured to determine a target depth of field corresponding to the scaling instruction;
第二调整模块,用于将所述三维圆柱图像的景深调整至所述目标景深。And a second adjustment module, configured to adjust a depth of field of the three-dimensional cylindrical image to the target depth of field.
可选的,所述装置还可以包括:Optionally, the device may further include:
计时模块,用于在接收用户发送的缩放指令后,启动计时器,并确定缩放时长;a timing module, configured to start a timer after receiving a zoom instruction sent by the user, and determine a zoom duration;
第四确定模块,用于确定当前时刻下所述计时器中存储的时间值;a fourth determining module, configured to determine a time value stored in the timer at a current moment;
判断模块,用于判断所存储的时间值是否小于所述缩放时长;如果小于,触发第三调整模块,如果大于等于,触发第四调整模块;a judging module, configured to determine whether the stored time value is less than the zooming time length; if not, triggering the third adjusting module, if greater than or equal to, triggering the fourth adjusting module;
第三调整模块,包括:计算子模块和调整子模块,The third adjustment module includes: a calculation submodule and an adjustment submodule,
计算子模块,用于计算所存储的时间值对应的过渡景深,其中,大于等于0且小于所述缩放时长的每一时间值对应一过渡景深,过渡景深位于所述三 维圆柱图像的当前景深与所述目标景深之间;a calculation sub-module, configured to calculate a transition depth of field corresponding to the stored time value, wherein each time value greater than or equal to 0 and less than the zoom duration corresponds to a transition depth of field, and the transition depth of field is located at a current depth of field of the three-dimensional cylindrical image Between the target depths of field;
调整子模块,用于将所述三维圆柱图像的景深调整至所述过渡景深;Adjusting a submodule for adjusting a depth of field of the three-dimensional cylindrical image to the transition depth of field;
第四调整模块,用于将所述三维圆柱图像的景深调整至所述目标景深。And a fourth adjustment module, configured to adjust a depth of field of the three-dimensional cylindrical image to the target depth of field.
可选的,所述计算子模块,具体可以用于:利用如下算式,进行计算:Optionally, the calculating sub-module may be specifically configured to: perform calculation by using the following formula:
过渡景深=所存储的时间值/所述缩放时长*(目标景深-三维圆柱图像的当前景深)+三维圆柱图像的当前景深。Transition Depth of Field = stored time value / said zoom duration * (target depth of field - current depth of field of the 3D cylindrical image) + current depth of field of the 3D cylindrical image.
可选的,所述装置还可以包括:Optionally, the device may further include:
第五确定模块,用于根据所述映射关系,确定所述展开面图像的展开边缘线映射到所述三维圆柱图像中对应的位置;a fifth determining module, configured to determine, according to the mapping relationship, that an expanded edge line of the expanded plane image is mapped to a corresponding position in the three-dimensional cylindrical image;
第六确定模块,用于根据预设区域划分规则,在所述三维圆柱图像中,确定所述位置所在的区域;a sixth determining module, configured to determine an area where the location is located in the three-dimensional cylindrical image according to a preset area dividing rule;
复制模块,用于对所确定的区域进行复制,得到复制图像;a copy module for copying the determined area to obtain a duplicate image;
添加模块,用于根据所述映射关系,将所述复制图像添加到所述展开面图像中。And a adding module, configured to add the duplicate image to the expanded plane image according to the mapping relationship.
为达到上述目的,本申请实施例还提供一种电子设备,其特征在于,包括处理器和存储器;To achieve the above objective, an embodiment of the present application further provides an electronic device, including a processor and a memory;
存储器,用于存放计算机程序;a memory for storing a computer program;
处理器,用于执行存储器上所存放的程序时,实现上述任一种鱼眼图像处理方法。The processor is configured to implement any of the above-described fisheye image processing methods when executing a program stored on the memory.
为达到上述目的,本申请实施例还公开了一种可执行程序代码,所述可执行程序代码用于被运行以执行上述任一种鱼眼图像处理方法。In order to achieve the above object, an embodiment of the present application further discloses an executable program code for being executed to execute any of the above-described fisheye image processing methods.
应用本申请实施例,将鱼眼图像映射到三维圆柱面上,得到三维圆柱图像,在接收到圆柱面展开指令后,将三维圆柱图像映射得到展开面图像;本方案中,三维圆柱图像的图像比半球图像视觉效果更好,如果用户想要看到背面视角的图像区域,不需要手动转动该三维圆柱,只需要发送圆柱面展开指令,便可以看到展开面图像,展开面图像中包含了大视角的图像区域,因此,提高了图像的展示效果。Applying the embodiment of the present application, the fisheye image is mapped onto the three-dimensional cylindrical surface to obtain a three-dimensional cylindrical image, and after receiving the cylindrical surface expansion instruction, the three-dimensional cylindrical image is mapped to obtain a developed surface image; in the present scheme, the image of the three-dimensional cylindrical image is obtained. It is better than the hemisphere image. If you want to see the image area of the back view, you don't need to manually rotate the 3D cylinder. You only need to send a cylindrical expansion command to see the expansion surface image. The expansion surface image contains The image area of the large viewing angle, therefore, improves the display effect of the image.
附图说明DRAWINGS
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的 附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application and the technical solutions of the prior art, the following description of the embodiments and the drawings used in the prior art will be briefly introduced. Obviously, the drawings in the following description are only Some embodiments of the application may also be used to obtain other figures from those of ordinary skill in the art without departing from the scope of the invention.
图1为本申请实施例提供的一种鱼眼图像处理方法的流程示意图;FIG. 1 is a schematic flowchart of a fisheye image processing method according to an embodiment of the present application;
图2为本申请实施例中的一种鱼眼图像示意图;2 is a schematic diagram of a fisheye image in the embodiment of the present application;
图3为本申请实施例中的一种坐标映射示意图;FIG. 3 is a schematic diagram of coordinate mapping in the embodiment of the present application;
图4为本申请实施例中的一种三维圆柱图像示意图;4 is a schematic diagram of a three-dimensional cylindrical image in an embodiment of the present application;
图5为本申请实施例中的一种三维圆柱图像展开为平面图像的俯视图;5 is a top view of a three-dimensional cylindrical image expanded into a planar image in the embodiment of the present application;
图6为本申请实施例中的一种三维圆柱图像展开为平面图像的过程示意图;6 is a schematic diagram of a process of expanding a three-dimensional cylindrical image into a planar image according to an embodiment of the present application;
图7为本申请实施例中的另一种三维圆柱图像展开为平面图像的俯视图;FIG. 7 is a top view showing another three-dimensional cylindrical image expanded into a planar image in the embodiment of the present application; FIG.
图8为本申请实施例中的一种三维圆柱图像转动不同角度的变换示意图;FIG. 8 is a schematic diagram of transformation of a three-dimensional cylindrical image rotated at different angles according to an embodiment of the present application; FIG.
图9为本申请实施例中的一种三维圆柱图像不同景深的变换示意图;FIG. 9 is a schematic diagram showing transformation of different depth of field of a three-dimensional cylindrical image in an embodiment of the present application; FIG.
图10为本申请实施例提供的一种鱼眼图像处理装置的结构示意图;FIG. 10 is a schematic structural diagram of a fisheye image processing apparatus according to an embodiment of the present application;
图11为本申请实施例提供的一种电子设备的结构示意图。FIG. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings. It is apparent that the described embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
为了解决上述技术问题,本申请实施例提供了一种鱼眼图像处理方法、装置及电子设备。该方法及装置可以应用于任意具有图像处理功能的电子设备,例如,计算机,或者鱼眼相机,或者和鱼眼相机连接的服务器,或者和鱼眼相机连接的手持设备等等,具体不做限定。In order to solve the above technical problem, the embodiment of the present application provides a fisheye image processing method, device, and electronic device. The method and device can be applied to any electronic device having an image processing function, such as a computer, or a fisheye camera, or a server connected to a fisheye camera, or a handheld device connected to a fisheye camera, etc., which is not limited. .
下面首先对本申请实施例提供的一种鱼眼图像处理方法进行详细说明。A fisheye image processing method provided by an embodiment of the present application is described in detail below.
图1为本申请实施例提供的一种鱼眼图像处理方法的流程示意图,包括:FIG. 1 is a schematic flowchart of a fisheye image processing method according to an embodiment of the present application, including:
S101:获取待处理鱼眼图像。S101: Acquire an image of a fisheye to be processed.
S102:根据预先设定的鱼眼图像坐标点与三维圆柱坐标点的映射关系,将该待处理鱼眼图像映射到三维圆柱面上,得到三维圆柱图像。S102: According to a mapping relationship between a preset fisheye image coordinate point and a three-dimensional cylindrical coordinate point, the fisheye image to be processed is mapped onto the three-dimensional cylindrical surface to obtain a three-dimensional cylindrical image.
S103:在接收到圆柱面展开指令后,根据预先设定的三维圆柱坐标点与 展开面图像坐标点的映射关系,将该三维圆柱图像进行映射,得到展开面图像。S103: After receiving the cylindrical surface expansion command, the three-dimensional cylindrical image is mapped according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed surface image coordinate point to obtain a developed surface image.
应用本申请图1所示实施例,将鱼眼图像映射到三维圆柱面上,得到三维圆柱图像,在接收到圆柱面展开指令后,将三维圆柱图像映射得到展开面图像;本方案中,三维圆柱图像的图像比半球图像视觉效果更好,如果用户想要看到背面视角的图像区域,不需要手动转动该三维圆柱,只需要发送圆柱面展开指令,便可以看到展开面图像,展开面图像中包含了大视角的图像区域,因此,提高了图像的展示效果。Applying the embodiment shown in FIG. 1 of the present application, the fisheye image is mapped onto the three-dimensional cylindrical surface to obtain a three-dimensional cylindrical image, and after receiving the cylindrical surface expansion instruction, the three-dimensional cylindrical image is mapped to obtain a developed surface image; in the scheme, three-dimensional The image of the cylindrical image is better than the hemisphere image. If you want to see the image area of the back view, you don't need to manually rotate the 3D cylinder. You only need to send the cylindrical expansion command to see the expansion surface image. The image contains an image area with a large viewing angle, thus improving the image display effect.
下面对图1所示实施例进行详细说明:The embodiment shown in Figure 1 will be described in detail below:
S101:获取待处理鱼眼图像。S101: Acquire an image of a fisheye to be processed.
举例来说,待处理图像可以如图2所示,图2为鱼眼摄像头采集到的图像。For example, the image to be processed can be as shown in FIG. 2, and FIG. 2 is an image collected by the fisheye camera.
S102:根据预先设定的鱼眼图像坐标点与三维圆柱坐标点的映射关系,将该待处理鱼眼图像映射到三维圆柱面上,得到三维圆柱图像。S102: According to a mapping relationship between a preset fisheye image coordinate point and a three-dimensional cylindrical coordinate point, the fisheye image to be processed is mapped onto the three-dimensional cylindrical surface to obtain a three-dimensional cylindrical image.
鱼眼图像为二维图像,鱼眼图像坐标系也为二维坐标系,举例来说,如图3所示,将鱼眼图像坐标系表示为uv坐标系。三维圆柱图像为三维图像,三维圆柱坐标系为三维坐标系,如图3所示,将三维圆柱坐标系表示为xyz坐标系。The fisheye image is a two-dimensional image, and the fisheye image coordinate system is also a two-dimensional coordinate system. For example, as shown in FIG. 3, the fisheye image coordinate system is represented as a uv coordinate system. The three-dimensional cylindrical image is a three-dimensional image, and the three-dimensional cylindrical coordinate system is a three-dimensional coordinate system. As shown in FIG. 3, the three-dimensional cylindrical coordinate system is represented as an xyz coordinate system.
假设鱼眼图像坐标系中的一个鱼眼图像坐标点p的坐标值为(u,v),三维圆柱坐标系中的一个三维圆柱坐标点p’的的坐标值为(x,y,z),三维圆柱的高为h,半径为r,鱼眼图像坐标点p与圆柱底面圆心的连线在xz平面中的投影线与x轴的夹角为α,映射关系可以为:Assume that the coordinate value of a fisheye image coordinate point p in the fisheye image coordinate system is (u, v), and the coordinate value of a three-dimensional cylindrical coordinate point p' in the three-dimensional cylindrical coordinate system is (x, y, z). The height of the three-dimensional cylinder is h, the radius is r, and the line connecting the fisheye image coordinate point p and the center of the cylinder bottom is in the xz plane. The angle between the projection line and the x-axis is α, and the mapping relationship can be:
α=u*2π,x=r*cos(α),y=h*v,z=r*sin(α)α=u*2π, x=r*cos(α), y=h*v,z=r*sin(α)
根据该映射关系,将待处理鱼眼图像中的鱼眼图像坐标点映射到三维圆柱坐标系中的三维圆柱坐标点,便得到了三维圆柱图像,三维圆柱图像可以如图4所示。According to the mapping relationship, the fisheye image coordinate points in the fisheye image to be processed are mapped to the three-dimensional cylindrical coordinate points in the three-dimensional cylindrical coordinate system, and a three-dimensional cylindrical image is obtained, and the three-dimensional cylindrical image can be as shown in FIG.
S103:在接收到圆柱面展开指令后,根据预先设定的三维圆柱坐标点与展开面图像坐标点的映射关系,将该三维圆柱图像进行映射,得到展开面图像。S103: After receiving the cylindrical surface expansion command, the three-dimensional cylindrical image is mapped according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed surface image coordinate point to obtain a developed surface image.
举例来说,展开面图像可以为平面图像、波浪状图像、预设弧度的曲面图像等等,具体不做限定。直观来说,将三维圆柱图像映射得到展开面图像,也就是将三维圆柱图像进行展开,展开面图像的高度与三维圆柱图像的高度 可以相同。For example, the unfolding surface image may be a planar image, a wavy image, a curved image of a preset curvature, or the like, which is not limited in detail. Intuitively, the three-dimensional cylindrical image is mapped to obtain a developed surface image, that is, the three-dimensional cylindrical image is expanded, and the height of the developed surface image can be the same as the height of the three-dimensional cylindrical image.
以展开面图像为平面图像为例来说,如图5所示,图5为将三维圆柱图像展开为平面图像的俯视图,假设图5中的B点为三维圆柱图像中的一个点,B点映射到平面图像中的点为E点,O点为三维圆柱图像展开的基准点,B点的坐标为(x,y,z),E点的坐标为(sign(x)*s,y,-r),s为OB的弧长。也就是说,三维圆柱坐标点与平面图像坐标点的映射关系为:将(x,y,z)映射到(sign(x)*s,y,-r)的映射关系。将三维圆柱图像的点按照该映射关系,映射到平面图像中,便得到了平面图像。Taking the unfolded surface image as a planar image as an example, as shown in FIG. 5, FIG. 5 is a plan view of expanding a three-dimensional cylindrical image into a planar image, and it is assumed that point B in FIG. 5 is a point in the three-dimensional cylindrical image, point B. The point mapped to the plane image is point E, the point O is the reference point for the expansion of the three-dimensional cylindrical image, the coordinates of point B are (x, y, z), and the coordinates of point E are (sign(x)*s, y, -r), s is the arc length of the OB. That is to say, the mapping relationship between the three-dimensional cylindrical coordinate points and the plane image coordinate points is: mapping (x, y, z) to the mapping relationship of (sign(x)*s, y, -r). According to the mapping relationship, the points of the three-dimensional cylindrical image are mapped into the planar image, and a planar image is obtained.
作为一种实施方式,执行本方案的电子设备(执行主体,以下简称为电子设备)可以包含显示屏,或者,也可以与一显示设备通信连接;可以在显示屏或者显示设备中展示三维圆柱图像展开为展开面图像的中间过程。As an implementation manner, an electronic device (executing body, hereinafter referred to as an electronic device) that executes the present solution may include a display screen, or may be communicably connected to a display device; a three-dimensional cylindrical image may be displayed on a display screen or a display device. Expand to the intermediate process of expanding the face image.
这种情况下,S103可以包括:In this case, S103 can include:
步骤一、在接收到圆柱面展开指令后,确定展开时长、以及目标展开面图像与所述三维圆柱图像的第一映射关系。Step 1: After receiving the cylindrical surface expansion instruction, determine the expansion duration, and the first mapping relationship between the target expansion surface image and the three-dimensional cylindrical image.
展开时长即为从接收到圆柱面展开指令、到展开结束持续的时长。展开时长可以预先设定;或者,也可以根据圆柱面展开指令来确定展开时长。比如,执行主体为触摸屏设备,圆柱面展开指令可以为用户手势,根据用户手势幅度的大小确定展开时长;再比如,执行主体为电脑,圆柱面展开指令可以为用户点击鼠标的指令,根据用户点击鼠标的频率确定展开时长,等等,具体不做限定。The expansion time is the length of time from the receipt of the cylindrical expansion command to the end of the expansion. The expansion time can be preset; or the expansion time can be determined according to the cylindrical expansion command. For example, the execution body is a touch screen device, and the cylindrical surface expansion instruction can be a user gesture, and the expansion time is determined according to the magnitude of the user gesture amplitude; for example, the execution body is a computer, and the cylindrical surface expansion instruction can be an instruction for the user to click the mouse, according to the user click The frequency of the mouse determines the length of the expansion, and so on, and is not limited.
目标展开面图像为展开结束后得到的展开面图像。目标展开面图像的形状可以有多种,比如平面图像、波浪状图像、预设弧度的曲面图像等等,具体不做限定。The target expansion surface image is an expansion surface image obtained after the expansion is completed. The shape of the target expansion surface image may be various, such as a planar image, a wavy image, a curved image of a preset curvature, and the like, which are not limited.
举例来说,可以预先设定目标展开面图像的形状,计算三维圆柱坐标点与预设形状的目标展开面的映射关系。本申请实施例中提到多个映射关系,为了区分描述,将目标展开面图像与三维圆柱图像的映射关系称为第一映射关系。For example, the shape of the target expansion surface image may be preset, and the mapping relationship between the three-dimensional cylindrical coordinate point and the target development surface of the preset shape may be calculated. In the embodiment of the present application, a plurality of mapping relationships are mentioned. To distinguish the description, the mapping relationship between the target expansion surface image and the three-dimensional cylindrical image is referred to as a first mapping relationship.
或者,也可以根据圆柱面展开指令来确定目标展开面图像的形状。比如,按键1对应平面图像,按键2对应波浪状图像,如果检测到用户点击按键1,则目标展开面图像为平面图像,如果检测到用户点击按键2,则目标展开面图像为波浪状图像。再比如,检测到用户点击一下鼠标,表示目标展开面图像为 平面图像,检测到用户点击两下鼠标,表示目标展开面图像为波浪状图像,等等,不再一一列举。Alternatively, the shape of the target development surface image may be determined according to the cylindrical surface expansion command. For example, the button 1 corresponds to a plane image, and the button 2 corresponds to a wave image. If the user clicks the button 1, the target expansion surface image is a planar image. If the user clicks the button 2, the target expansion surface image is a wave image. For example, it is detected that the user clicks the mouse to indicate that the target expansion surface image is a flat image, and the user is detected that the user clicks on the mouse twice, indicating that the target expansion surface image is a wave image, and so on, and is not enumerated one by one.
如果确定出目标展开图像为平面图像,则计算三维圆柱坐标点与平面图像的的映射关系,作为第一映射关系;如果确定出目标展开图像为波浪状图像,则计算三维圆柱坐标点与波浪状图像的的映射关系,作为第一映射关系。If it is determined that the target expanded image is a planar image, the mapping relationship between the three-dimensional cylindrical coordinate point and the planar image is calculated as the first mapping relationship; if the target expanded image is determined to be a wavy image, the three-dimensional cylindrical coordinate point and the wavy shape are calculated. The mapping relationship of the image as the first mapping relationship.
步骤二、根据所述展开时长、以及所述第一映射关系,确定到达所述展开时长之前的每一时刻展开面图像与所述三维圆柱图像的第二映射关系。Step 2: Determine, according to the expansion duration and the first mapping relationship, a second mapping relationship between the expansion surface image and the three-dimensional cylindrical image at each time before reaching the expansion duration.
举例来说,由三维圆柱图像展开得到目标展开面图像,可以为一个匀速展开的过程。这样,可以根据该展开时长,对三维圆柱图像和目标展开面图像之间进行线性插值,也就是对该第一映射关系中包括的三维圆柱坐标点与目标展开面图像坐标点之间进行线性插值。For example, the expansion of the image from the three-dimensional cylindrical image to obtain the target expansion surface image can be a uniform expansion process. In this way, linear interpolation between the three-dimensional cylindrical image and the target expansion surface image may be performed according to the expansion duration, that is, linear interpolation between the three-dimensional cylindrical coordinate point included in the first mapping relationship and the target expansion surface image coordinate point .
假设目标展开面图像为平面图像,仍以图5为例进行说明,第一映射关系为:将(x,y,z)映射到(sign(x)*s,y,-r)的映射关系。假设展开时长为T,对三维圆柱图像与平面图像之间进行线性插值,T中的每一时刻对应的第二映射关系为:将(x,y,z)映射到{x+t*sign(x)*s-x,y,t*(-r-z)}的映射关系。其中,t为T中的一个过程量,或者说t为展开过程进行的百分比。比如,T为1秒,当前时刻下展开过程已持续了0.5秒,则t为50%。Assuming that the target expansion surface image is a planar image, still taking FIG. 5 as an example, the first mapping relationship is: mapping (x, y, z) to the mapping relationship of (sign(x)*s, y, -r) . Assuming that the expansion time is T, linear interpolation between the three-dimensional cylindrical image and the planar image is performed. The second mapping relationship corresponding to each moment in T is: mapping (x, y, z) to {x+t*sign( x) The mapping relationship of *sx, y, t*(-rz)}. Where t is a process quantity in T, or t is the percentage of the expansion process. For example, T is 1 second, and the expansion process has continued for 0.5 seconds at the current moment, then t is 50%.
步骤三、针对到达所述展开时长之前的每一时刻,根据该时刻对应的第二映射关系,将所述三维圆柱图像进行映射,得到该时刻展开面图像。Step 3: For each time before the expansion time is reached, the three-dimensional cylindrical image is mapped according to the second mapping relationship corresponding to the time, and the time expansion surface image is obtained.
步骤二中得到了T中的每一时刻对应的第二映射关系,针对T中的每一时刻,根据该时刻对应的第二映射关系,将三维圆柱图像进行映射,便得到了T中每一时刻的展开面图像,这样,展示给用户的是一动态的展开过程。In step 2, a second mapping relationship corresponding to each moment in the T is obtained. For each moment in the T, the three-dimensional cylindrical image is mapped according to the second mapping relationship corresponding to the moment, and each of the Ts is obtained. The expanded face image of the moment, so that is presented to the user is a dynamic expansion process.
步骤三、到达所述展开时长时,根据所述第一映射关系,将所述三维圆柱图像进行映射,得到所述目标展开面图像。Step 3: When the deployment duration is reached, the three-dimensional cylindrical image is mapped according to the first mapping relationship to obtain the target expansion surface image.
到达T后,展开完成,展示给用户的是目标展开面图像。因此,根据第一映射关系,将三维圆柱图像映射得到目标展开面图像。After reaching T, the expansion is completed, and the image of the target expansion surface is displayed to the user. Therefore, according to the first mapping relationship, the three-dimensional cylindrical image is mapped to obtain a target expansion surface image.
可选地,“展示三维圆柱图像展开为展开面图像的中间过程”也可以通过下面的实施方式实现,S103可以包括:Alternatively, the "intermediate process of displaying the three-dimensional cylindrical image as a developed surface image" may also be implemented by the following embodiments, and S103 may include:
在接收到圆柱面展开指令后,启动计时器,并确定展开时长;After receiving the cylindrical expansion command, start the timer and determine the expansion time;
确定当前时刻下所述计时器中存储的时间值;Determining a time value stored in the timer at the current moment;
判断所存储的时间值是否小于所述展开时长;Determining whether the stored time value is less than the expansion time;
如果小于,根据所存储的时间值对应的第三映射关系,将所述三维圆柱图像进行映射,得到所存储的时间值对应的展开曲面图像;其中,大于等于0且小于所述展开时长的每个时间值分别对应一份第三映射关系,一份第三映射关系为:三维圆柱坐标点与一个时间值对应的展开曲面图像坐标点的映射关系;If the value is smaller than the third mapping relationship corresponding to the stored time value, the three-dimensional cylindrical image is mapped to obtain an expanded surface image corresponding to the stored time value; wherein, each of the expansion time is greater than or equal to 0 The time values respectively correspond to a third mapping relationship, and a third mapping relationship is: a mapping relationship between the three-dimensional cylindrical coordinate points and a coordinate value of the expanded curved image corresponding to a time value;
如果大于等于,根据预先设定的三维圆柱坐标点与展开平面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开平面图像。If it is greater than or equal to, the three-dimensional cylindrical image is mapped according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed planar image coordinate point, and an expanded planar image is obtained.
本实施方式中,以目标展开图像为平面图像为例进行说明。如上所述,展开时长即为从接收到圆柱面展开指令、到展开结束持续的时长。展开时长可以预先设定;或者,也可以根据圆柱面展开指令来确定展开时长。In the present embodiment, a case where the target expanded image is a planar image will be described as an example. As described above, the expansion time is the length of time from the reception of the cylindrical surface expansion command to the end of the expansion. The expansion time can be preset; or the expansion time can be determined according to the cylindrical expansion command.
为了方便描述,将展开时长记作T,将计时器中存储的时间值记作T’。也就是说,在接收到圆柱面展开指令后的T之内是展开过程,T之后为对目标展开面图像的展示过程。展开过程是动态的,展开过程中的每一时刻下的画面内容不同,该画面内容即为展开曲面图像,如图6所示。对平面图像的展示过程是静态的,仅对该平面图像进行展示,但是如果在展示过程中接收到其他指令,则执行其他指令。For convenience of description, the expansion time is denoted by T, and the time value stored in the timer is denoted as T'. That is to say, within the T after receiving the cylindrical surface expansion instruction is the expansion process, and after T is the process of displaying the surface of the target expansion surface. The expansion process is dynamic. The content of the screen at each moment in the expansion process is different. The content of the screen is the expanded surface image, as shown in Figure 6. The presentation process for a flat image is static, only the planar image is shown, but if other instructions are received during the presentation, other instructions are executed.
举例来说,在接收到圆柱面展开指令后,启动计时器,计时器中的T’值由0开始随时间逐渐增大;如果T’小于T,则需要将该三维圆柱图像映射到展开曲面图像上,且不同的T’值对应不同的映射关系,不同时刻下的展开曲面图像不同。为了区分描述,将三维圆柱坐标点与一个T’值对应的展开曲面图像坐标点的映射关系称为第三映射关系。For example, after receiving the cylindrical expansion command, the timer is started, and the T' value in the timer gradually increases from 0 to 0; if T' is smaller than T, the 3D cylindrical image needs to be mapped to the expanded surface. On the image, different T' values correspond to different mapping relationships, and the expanded surface images at different times are different. In order to distinguish the description, the mapping relationship between the coordinate points of the developed curved surface image corresponding to a T' value of the three-dimensional cylindrical coordinate point is referred to as a third mapping relationship.
假设所述三维圆柱坐标点的坐标值包括:第一坐标值、第二坐标值和第三坐标值,所述一个时间值对应的展开曲面图像坐标点包括:第四坐标值、第五坐标值和第六坐标值;It is assumed that the coordinate values of the three-dimensional cylindrical coordinate points include: a first coordinate value, a second coordinate value, and a third coordinate value, and the expanded surface image coordinate points corresponding to the one time value include: a fourth coordinate value and a fifth coordinate value And sixth coordinate value;
所述根据所述比值对应的第三映射关系,将所述三维圆柱图像进行映射,包括:And mapping the three-dimensional cylindrical image according to the third mapping relationship corresponding to the ratio, including:
针对所存储的每一时间值,计算该时间值与所述展开时长的比值,也就是T’与T的比值,记作t,t为T中的一个过程量,或者说t为展开过程进行的百分比;Calculating, for each stored time value, a ratio of the time value to the expansion time, that is, a ratio of T' to T, denoted by t, t is a process quantity in T, or t is an expansion process Percentage
根据所述第一坐标值、所述第一坐标值与预设基准点之间的弧长以及所 述比值,计算所映射到的第四坐标值;其中,所述弧长根据视点角度及所述三维圆柱的半径确定;Calculating the mapped fourth coordinate value according to the first coordinate value, the arc length between the first coordinate value and the preset reference point, and the ratio; wherein the arc length is according to the viewpoint angle and the Determining the radius of the three-dimensional cylinder;
将所述第二坐标值确定为所映射到的第五坐标值;Determining the second coordinate value as the fifth coordinate value to be mapped;
根据所述第三坐标值、所述三维圆柱的半径以及所述比值,计算所映射到的第六坐标值。The mapped sixth coordinate value is calculated according to the third coordinate value, the radius of the three-dimensional cylinder, and the ratio.
举例来说,如图7所示,图7与图5内容类似,只是增加了展示过程中的点P,B点为三维圆柱图像中的一个点,B点映射到平面图像中的点为E点,O点为预设基准点,P点为将B点展开到E点过程中的一个点,P点的坐标值包括:第四坐标值、第五坐标值和第六坐标值;B点的坐标为(x,y,z),E点的坐标为(sign(x)*s,y,-r),s为OB的弧长。For example, as shown in FIG. 7, FIG. 7 is similar to FIG. 5 except that the point P in the display process is added, the point B is a point in the three-dimensional cylindrical image, and the point B is mapped to the point in the plane image as E. Point, point O is the preset reference point, point P is a point in the process of expanding point B to point E. The coordinate values of point P include: fourth coordinate value, fifth coordinate value and sixth coordinate value; point B The coordinates are (x, y, z), the coordinates of point E are (sign(x)*s, y, -r), and s is the arc length of OB.
图7中,第一坐标值为x,第二坐标值为y,第三坐标值为z,三维圆柱坐标点的坐标为(x,y,z),x与预设基准点之间的弧长为OB的弧长:In Fig. 7, the first coordinate value is x, the second coordinate value is y, the third coordinate value is z, the coordinate of the three-dimensional cylindrical coordinate point is (x, y, z), and the arc between x and the preset reference point The length of the arc is OB:
本实施方式中,第四坐标值根据x、x与预设基准点之间的弧长以及t,计算得到,具体的,第四坐标值=x+t*[sign(x)*OB的弧长-x],OB的弧长=r*(π-视点角度),视点角度=tan -1(|x|/z); In this embodiment, the fourth coordinate value is calculated according to the arc length between x, x and the preset reference point and t, and specifically, the arc of the fourth coordinate value=x+t*[sign(x)*OB Length -x], arc length of OB = r * (π - viewpoint angle), viewpoint angle = tan -1 (|x|/z);
展开过程中,y值不变,第五坐标值=y;During the expansion process, the y value is unchanged, and the fifth coordinate value = y;
第六坐标值根据z、r、t,计算得到,具体的,第六坐标值=z+t*(-r-z)。The sixth coordinate value is calculated according to z, r, t, and specifically, the sixth coordinate value = z + t * (-r-z).
这样,便可以计算出t在(0,1)区间中每一时刻的映射关系,根据该每一时刻的映射关系,便可以得到该每一时刻下的展开曲面,也就是展示了由三维圆柱图像展开到平面图像的动态过程,展示效果好。In this way, the mapping relationship of t at each moment in the interval (0, 1) can be calculated. According to the mapping relationship at each moment, the expanded surface at each moment can be obtained, that is, the three-dimensional cylinder is displayed. The dynamic process of expanding the image to a flat image shows that the effect is good.
如果t大于等于1,则完成了展开过程,仅对展开后的平面图像进行展示。具体的,假设三维圆柱坐标点的坐标值包括:第一坐标值、第二坐标值和第三坐标值,所述展开平面图像坐标点的坐标值包括:第七坐标值、第八坐标值和第九坐标值;If t is greater than or equal to 1, the expansion process is completed, and only the expanded planar image is displayed. Specifically, it is assumed that the coordinate values of the three-dimensional cylindrical coordinate points include: a first coordinate value, a second coordinate value, and a third coordinate value, and the coordinate values of the expanded planar image coordinate point include: a seventh coordinate value, an eighth coordinate value, and Ninth coordinate value;
所述根据预先设定的三维圆柱坐标点与展开平面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开平面图像,包括:And mapping the three-dimensional cylindrical image according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed planar image coordinate point, to obtain an expanded planar image, including:
根据所述第一坐标值、以及所述第一坐标值与预设基准点之间的弧长,计算所映射到的第七坐标值;其中,所述弧长根据视点角度及所述三维圆柱的半径确定;Calculating the mapped seventh coordinate value according to the first coordinate value and an arc length between the first coordinate value and the preset reference point; wherein the arc length is according to the viewpoint angle and the three-dimensional cylinder Radius determination;
将所述第二坐标值确定为所映射到的第八坐标值;Determining the second coordinate value as the eighth coordinate value to be mapped;
将所述三维圆柱的半径的相反数确定为映射到的第九坐标值。The inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
图7中,第一坐标值为x,第二坐标值为y,第三坐标值为z,三维圆柱坐标点的坐标为(x,y,z),x与预设基准点之间的弧长为OB的弧长,E点的坐标值包括:第七坐标值、第八坐标值和第九坐标值:In Fig. 7, the first coordinate value is x, the second coordinate value is y, the third coordinate value is z, the coordinate of the three-dimensional cylindrical coordinate point is (x, y, z), and the arc between x and the preset reference point The arc length of the length OB, the coordinate value of the E point includes: a seventh coordinate value, an eighth coordinate value, and a ninth coordinate value:
本实施方式中,第七坐标值根据x、x与预设基准点之间的弧长,计算得到,具体的,第七坐标值=sign(x)*OB的弧长,OB的弧长=r*(π-视点角度),视点角度=tan -1(|x|/z); In this embodiment, the seventh coordinate value is calculated according to the arc length between x, x and the preset reference point, specifically, the arc length of the seventh coordinate value=sign(x)*OB, and the arc length of the OB= r*(π-viewpoint angle), viewpoint angle=tan -1 (|x|/z);
第八坐标值=y;Eightth coordinate value = y;
第九坐标值为r的相反数,第九坐标值=-r。The ninth coordinate value is the opposite of r, and the ninth coordinate value = -r.
将三维圆柱图像的点按照该映射关系,映射到展开平面图像中,便得到了展开平面图像。According to the mapping relationship, the points of the three-dimensional cylindrical image are mapped into the developed planar image, and the developed planar image is obtained.
下面介绍一个具体的例子:Here is a specific example:
假设获取到图2中所示的待处理鱼眼图像,鱼眼图像坐标系为uv坐标系。如图3所示,鱼眼图像坐标点与三维圆柱坐标点的映射关系为:α=u*2π,x=r*cos(α),y=h*v,z=r*sin(α),根据该映射关系,将待处理鱼眼图像映射到三维圆柱面上,得到三维圆柱图像。其中,待处理鱼眼图像的坐标点为(u,v),三维圆柱图像的坐标点为(x,y,z)。Assuming that the fisheye image to be processed shown in FIG. 2 is acquired, the fisheye image coordinate system is a uv coordinate system. As shown in Fig. 3, the mapping relationship between the fisheye image coordinate points and the three-dimensional cylindrical coordinate points is: α=u*2π, x=r*cos(α), y=h*v, z=r*sin(α) According to the mapping relationship, the fisheye image to be processed is mapped onto the three-dimensional cylindrical surface to obtain a three-dimensional cylindrical image. The coordinate point of the fisheye image to be processed is (u, v), and the coordinate point of the three-dimensional cylindrical image is (x, y, z).
接收到圆柱面展开指令,启动计时器,计时器中存储的时间值记作T’。假设目标展开面图像为平面图像,假设展开时长为T。The cylindrical surface expansion command is received, the timer is started, and the time value stored in the timer is recorded as T'. Assume that the target expansion surface image is a planar image, assuming that the expansion time is T.
在接收到圆柱面展开指令之后,确定每一当前时刻下计时器中存储的时间值T’,如果T’小于T,则确定T’对应的第三映射关系为:将(x,y,z)映射到{x+t*sign(x)*s-x,y,t*(-r-z)}的映射关系;其中,(x,y,z)为三维圆柱图像的坐标点,{x+t*sign(x)*s-x,y,t*(-r-z)}为该T’对应的展开曲面图像坐标点,t=T’/T,s=r*(π-α),α=tan -1(|x|/z)。根据该第三映射关系,将三维圆柱图像进行映射,得到展开曲面图像。 After receiving the cylindrical surface expansion instruction, determining the time value T′ stored in the timer at each current moment, if T′ is less than T, determining that the third mapping relationship corresponding to T′ is: (x, y, z Mapped to the mapping relationship of {x+t*sign(x)*sx,y,t*(-rz)}; where (x,y,z) is the coordinate point of the 3D cylindrical image, {x+t* Sign(x)*sx,y,t*(-rz)} is the coordinate point of the expanded surface image corresponding to the T', t=T'/T, s=r*(π-α), α=tan -1 (|x|/z). According to the third mapping relationship, the three-dimensional cylindrical image is mapped to obtain an expanded curved surface image.
如果T’大于等于T,则确定的映射关系为将(x,y,z)映射到(sign(x)*s,y,-r)的映射关系;根据该映射关系,将三维圆柱图像进行映射,得到展开平面图像。If T' is greater than or equal to T, the determined mapping relationship is a mapping relationship that maps (x, y, z) to (sign(x)*s, y, -r); according to the mapping relationship, the three-dimensional cylindrical image is performed. Map to get the expanded planar image.
在本申请的一个可选实施例中,展开过程是动态的,展开过程中的每一时刻下的画面内容不同,该画面内容即为展开曲面图像,如图6所示。对平面图像的展示过程是静态的,仅对该平面图像进行展示,但是如果在展示过程中接收到其他指令,则执行其他指令。例如,接收到鼠标右键双击的信号, 则生成完全展开指令,三维圆柱图像展开为平面图像。在展示平面图像的过程中,接收到恢复指令,则恢复到三维圆柱图像。In an optional embodiment of the present application, the unfolding process is dynamic, and the content of the screen at each moment in the unfolding process is different, and the content of the screen is an expanded curved image, as shown in FIG. 6. The presentation process for a flat image is static, only the planar image is shown, but if other instructions are received during the presentation, other instructions are executed. For example, if a signal of a double click of the right mouse button is received, a full expansion instruction is generated, and the three-dimensional cylindrical image is expanded into a planar image. In the process of displaying the planar image, upon receiving the restoration instruction, the image is restored to the three-dimensional cylindrical image.
作为一种实施方式,在S102之后、S103之前,还可以包括:As an implementation manner, after S102 and before S103, the method may further include:
接收用户发送的转动圆柱指令;确定所述转动圆柱指令对应的转动角度;以所述三维圆柱图像的中心线为轴,将所述三维圆柱图像转动所述转动角度。Receiving a rotation cylinder command sent by the user; determining a rotation angle corresponding to the rotation cylinder instruction; and rotating the three-dimensional cylinder image by the rotation angle by using a center line of the three-dimensional cylindrical image as an axis.
举例来说,电子设备包含的显示屏、或者与电子设备相连的显示设备可以为触摸屏,用户可以通过在触摸屏上做手势来发送转动圆柱指令,比如,如果电子设备检测到用户在触摸屏上左右滑动的手势,则表示接收到转动圆柱指令。For example, the display screen included in the electronic device or the display device connected to the electronic device may be a touch screen, and the user may send a rotating cylinder instruction by making a gesture on the touch screen, for example, if the electronic device detects that the user slides left and right on the touch screen The gesture indicates that the rotary cylinder command was received.
手势与指令内容的具体对应关系可以根据实际情况设定,比如,可以设定向左滑动为顺时针转动,向右滑动为逆时针转动,还可以设定滑动的幅度与转动角度的对应关系。转动角度可以有正负,比如,顺时针转动为正值,逆时针转动为负值。The specific correspondence between the gesture and the command content can be set according to the actual situation. For example, it can be set to slide to the left to rotate clockwise, to the right to rotate counterclockwise, and to set the corresponding relationship between the amplitude of the slide and the angle of rotation. The angle of rotation can be positive or negative, for example, clockwise rotation is positive and counterclockwise rotation is negative.
假设检测到用户在触摸屏上向左滑动的手势,并确定该手势对应的转动角度为顺时针转动20度,或者说+20度,则以三维圆柱图像的中心线为轴,将三维圆柱图像顺时针转动20度。Assuming that the user's gesture of sliding to the left on the touch screen is detected, and the rotation angle corresponding to the gesture is determined to be 20 degrees clockwise, or +20 degrees, the center line of the three-dimensional cylindrical image is taken as the axis, and the three-dimensional cylindrical image is smoothed. The hour hand turns 20 degrees.
图8为三维圆柱图像转动不同角度的变换示意图。Fig. 8 is a schematic diagram showing the transformation of the three-dimensional cylindrical image at different angles.
作为一种实施方式,在S102之后、S103之前,还可以包括:As an implementation manner, after S102 and before S103, the method may further include:
接收用户发送的缩放指令;Receiving a zoom instruction sent by the user;
确定所述缩放指令对应的目标景深;Determining a target depth of field corresponding to the scaling instruction;
将所述三维圆柱图像的景深调整至所述目标景深。The depth of field of the three-dimensional cylindrical image is adjusted to the target depth of field.
举例来说,电子设备包含的显示屏、或者与电子设备相连的显示设备可以为触摸屏,用户可以通过在触摸屏上做手势来发送缩放指令,比如,如果电子设备检测到用户在触摸屏上手指捏合的手势,则表示接收到缩小指令,如果检测到用户在触摸屏上手指分离的手势,则表示接收到放大指令。For example, the display screen included in the electronic device or the display device connected to the electronic device may be a touch screen, and the user may send a zoom instruction by making a gesture on the touch screen, for example, if the electronic device detects that the user pinches on the touch screen The gesture indicates that the zoom-out instruction is received, and if the gesture of the user's finger separation on the touch screen is detected, it indicates that the zoom-in instruction is received.
图像缩小也就是图像远离视角,景深变大,图像放大也就是图像与视角距离变近,景深变小;手势与指令内容的具体对应关系可以根据实际情况设定,比如,可以设定手指捏合的幅度与景深变大的对应关系、以及手指分离的幅度与景深变小的对应关系,等等,具体不做限定。The image is reduced, that is, the image is far away from the angle of view, the depth of field becomes larger, the image is enlarged, that is, the distance between the image and the angle of view becomes closer, and the depth of field becomes smaller; the specific correspondence between the gesture and the command content can be set according to the actual situation, for example, the finger pinch can be set. The correspondence between the amplitude and the depth of field is large, and the correspondence between the amplitude of the finger separation and the depth of field is small, and so on, and is not limited.
假设检测到用户在触摸屏上手指捏合的手势,并确定该手势对应的目标景深,则将三维圆柱图像的景深调整至目标景深。图9为三维圆柱图像不同景 深的变换示意图。Assuming that the user's gesture of finger pinching on the touch screen is detected and the target depth of field corresponding to the gesture is determined, the depth of field of the three-dimensional cylindrical image is adjusted to the target depth of field. Fig. 9 is a schematic diagram showing the transformation of different depths of a three-dimensional cylindrical image.
作为一种实施方式,可以在电子设备的显示屏、或者与电子设备相连的显示设备中展示调整景深的中间过程,具体的,在接收用户发送的缩放指令后,可以启动计时器,并确定缩放时长;As an implementation manner, an intermediate process of adjusting the depth of field may be displayed on a display screen of the electronic device or a display device connected to the electronic device. Specifically, after receiving the zoom instruction sent by the user, the timer may be started, and the zoom is determined. duration;
所述将所述三维圆柱图像的景深调整至所述目标景深,包括:Adjusting the depth of field of the three-dimensional cylindrical image to the target depth of field includes:
确定当前时刻下所述计时器中存储的时间值;Determining a time value stored in the timer at the current moment;
判断所存储的时间值是否小于所述缩放时长;Determining whether the stored time value is less than the scaling time;
如果小于,计算所存储的时间值对应的过渡景深,其中,大于等于0且小于所述缩放时长的每一时间值对应一过渡景深,过渡景深位于所述三维圆柱图像的当前景深与所述目标景深之间;将所述三维圆柱图像的景深调整至所述过渡景深;If the value is less than, the transition depth of field corresponding to the stored time value is calculated, wherein each time value greater than or equal to 0 and less than the zoom duration corresponds to a transition depth of field, and the transition depth of field is located at the current depth of field of the three-dimensional cylindrical image and the target Between the depths of field; adjusting the depth of field of the three-dimensional cylindrical image to the transition depth of field;
如果大于等于,将所述三维圆柱图像的景深调整至所述目标景深。If it is greater than or equal to, the depth of field of the three-dimensional cylindrical image is adjusted to the target depth of field.
缩放时长即为从接收到缩放指令、到缩放结束持续的时长。缩放时长可以预先设定;或者,也可以根据缩放指令来确定缩放时长。比如,执行主体为触摸屏设备,缩放指令可以为用户手势,根据用户手势幅度的大小确定缩放时长。The zoom duration is the length of time from the receipt of the zoom command to the end of the zoom. The zoom duration can be preset; or the zoom duration can be determined based on the zoom command. For example, the execution subject is a touch screen device, and the zoom instruction may be a user gesture, and the zoom duration is determined according to the magnitude of the user gesture amplitude.
假设缩放时长为1秒,则在接收到缩放指令后的1秒之内是景深调整过程,将这个过程中的景深称为过渡景深,景深调整过程中的每一时刻下的过渡景深不同。Assuming that the zoom duration is 1 second, the depth of field adjustment process is within 1 second after receiving the zoom instruction, and the depth of field in this process is referred to as the transition depth of field, and the transition depth at each moment in the depth of field adjustment process is different.
作为一种实施方式,过渡景深=所存储的时间值/所述缩放时长*(目标景深-三维圆柱图像的当前景深)+三维圆柱图像的当前景深。As an embodiment, the transition depth of field = the stored time value / the zoom duration * (target depth of field - the current depth of field of the three-dimensional cylindrical image) + the current depth of field of the three-dimensional cylindrical image.
本实施方式中,由当前景深过渡到目标景深,图像调整过程更流畅,视觉效果较好。In the embodiment, the current depth of field transitions to the target depth of field, the image adjustment process is smoother, and the visual effect is better.
作为一种实施方式,在S102之后、S103之前,还可以包括:As an implementation manner, after S102 and before S103, the method may further include:
接收用户发送的视点移动指令;Receiving a viewpoint movement instruction sent by the user;
确定所述视点移动指令对应的视点角度与景深;Determining a viewpoint angle and a depth of field corresponding to the viewpoint movement instruction;
根据所确定的视点角度与景深,对所述三维圆柱图像的进行调整。The three-dimensional cylindrical image is adjusted according to the determined viewpoint angle and depth of field.
举例来说,电子设备包含的显示屏、或者与电子设备相连的显示设备可以为触摸屏,用户可以通过在触摸屏上做手势来发送视点移动指令,比如,如果电子设备检测到用户在触摸屏中上下滑动的手势,则表示接收到视点移动指令。For example, the display screen included in the electronic device or the display device connected to the electronic device may be a touch screen, and the user may send a viewpoint moving instruction by making a gesture on the touch screen, for example, if the electronic device detects that the user slides up and down in the touch screen. The gesture indicates that the viewpoint movement instruction is received.
视点移动后,景深和视点角度通常都会发生变化,手势与指令内容的具体对应关系可以根据实际情况设定,比如,可以设定向上滑动的幅度与景深和视点角度变化的对应关系、以及向下滑动的幅度与景深和视点角度变化的对应关系,等等,具体不做限定。After the viewpoint is moved, the depth of field and the angle of the viewpoint usually change. The specific correspondence between the gesture and the command content can be set according to the actual situation. For example, the relationship between the amplitude of the upward sliding and the change of the depth of field and the angle of the viewpoint can be set, and the downward relationship can be set. The corresponding relationship between the amplitude of the sliding and the change of the depth of field and the angle of the viewpoint, etc., is not limited in detail.
根据该对应关系,确定要达到的视点角度与景深;将三维圆柱图像的视点角度至调整所确定的视点角度,将三维圆柱图像的景深至调整所确定的景深。According to the correspondence relationship, the viewpoint angle and the depth of field to be reached are determined; the viewpoint angle of the three-dimensional cylindrical image is adjusted to the determined viewpoint angle, and the depth of field of the three-dimensional cylindrical image is adjusted to the determined depth of field.
作为一种实施方式,可以设定三维圆柱图像的初始景深,也就是S102得到三维圆柱图像后,对该三维圆柱图像进行展示时的景深,之后接收到视点移动指令或者缩放指令后,在该初始景深的基础上进行调整。As an implementation manner, an initial depth of field of the three-dimensional cylindrical image may be set, that is, a depth of field when the three-dimensional cylindrical image is obtained after S102 is obtained, and then after receiving the viewpoint movement instruction or the zoom instruction, the initial Adjust based on the depth of field.
比如,初始景深=(h/2)/[tan(fov/2)],fov表示视场角,视场角可以根据实际情况进行设定,比如,可以设定为120度-180度之间的数值。For example, the initial depth of field = (h / 2) / [tan (fov / 2)], fov represents the field of view, the field of view can be set according to the actual situation, for example, can be set between 120 degrees and 180 degrees The value.
在本实施例中,确定映射关系的过程、以及根据映射关系将图像进行映射的过程可以在GPU(Graphics Processing Unit,图形处理器)中执行,这样既可以提高计算速度,也可以减少CPU使用率。In this embodiment, the process of determining the mapping relationship and the process of mapping the image according to the mapping relationship may be performed in a GPU (Graphics Processing Unit), thereby improving the calculation speed and reducing the CPU usage. .
作为一种实施方式,在S103之后,还可以包括:As an implementation manner, after S103, the method may further include:
根据所述映射关系,确定所述展开面图像的展开边缘线映射到所述三维圆柱图像中对应的位置;根据预设区域划分规则,在所述三维圆柱图像中,确定所述位置所在的区域;对所确定的区域进行复制,得到复制图像;根据所述映射关系,将所述复制图像添加到所述展开面图像中。Determining, according to the mapping relationship, that the expanded edge line of the unfolding plane image is mapped to a corresponding position in the three-dimensional cylindrical image; determining, according to a preset region dividing rule, the region where the location is located Copying the determined area to obtain a duplicate image; adding the copied image to the expanded plane image according to the mapping relationship.
展开边缘线可以如图6中所示,可以理解,如果展开边缘线所在位置存在一个人像,则展开面图像中该人像被拆成两部分,展示效果较差。而本实施方式中,将展开边缘线所在的区域进行复制,并将复制图像添加到展开面图像中,如果展开边缘线所在位置存在一个人像,则将该人像所在区域进行复制,并将复制图像添加至展开面图像中,具体的,可以在展开面图像两个边缘位置各添加一份复制图像,这样,展开面图像两个边缘位置都为完整的人像,提高了展示效果。The expanded edge line can be as shown in Fig. 6. It can be understood that if there is a portrait at the position where the expanded edge line is located, the portrait image is split into two parts in the expanded plane image, and the display effect is poor. In the embodiment, the area where the edge line is expanded is copied, and the copied image is added to the expanded surface image. If there is a portrait at the position where the edge line is expanded, the area where the portrait is located is copied, and the image is copied. It is added to the expansion surface image. Specifically, a copy image can be added to each edge position of the expansion surface image, so that both edge positions of the expansion surface image are complete portraits, which improves the display effect.
比如,以展开边缘线映射到三维圆柱图像中对应的位置为中心线,确定一块预设尺寸的图像区域,对该区域进行复制,并将复制区域分别添加到展开面图像的左右两侧。For example, a contoured image is mapped to a corresponding position in the three-dimensional cylindrical image as a center line, and an image area of a preset size is determined, the area is copied, and the copy area is separately added to the left and right sides of the expanded image.
再比如,确定该位置(展开边缘线映射到三维圆柱图像中对应的位置)向左预设距离内的区域,对该区域进行复制,并将复制区域添加到展开面图像的右侧边缘,确定该位置向右预设距离内的区域,对该区域进行复制,并将复制区域添加到展开面图像的左侧边缘。For another example, determining the position (the expanded edge line is mapped to the corresponding position in the three-dimensional cylindrical image) to the left within the preset distance, copying the area, and adding the copied area to the right edge of the expanded image, determining The position is preset to the right within the distance, the area is copied, and the copied area is added to the left edge of the expanded-surface image.
与上述方法实施例相对应,本申请实施例还提供一种鱼眼图像处理装置,如图10所示,所述装置包括:Corresponding to the above method embodiment, the embodiment of the present application further provides a fisheye image processing apparatus. As shown in FIG. 10, the apparatus includes:
获取模块1001,用于获取待处理鱼眼图像;The obtaining module 1001 is configured to obtain a fisheye image to be processed;
第一映射模块1002,用于根据预先设定的鱼眼图像坐标点与三维圆柱坐标点的映射关系,将所述待处理鱼眼图像映射到三维圆柱面上,得到三维圆柱图像;The first mapping module 1002 is configured to map the image of the fisheye to be processed onto the three-dimensional cylindrical surface according to a mapping relationship between the preset fisheye image coordinate point and the three-dimensional cylindrical coordinate point, to obtain a three-dimensional cylindrical image;
第二映射模块1003,用于在接收到圆柱面展开指令后,根据预先设定的三维圆柱坐标点与展开面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开面图像。The second mapping module 1003 is configured to map the three-dimensional cylindrical image according to a mapping relationship between a preset three-dimensional cylindrical coordinate point and a developed surface image coordinate point after receiving the cylindrical surface expansion command, to obtain a developed surface image.
作为一种实施方式,第二映射模块1003,具体可以用于:As an implementation manner, the second mapping module 1003 may be specifically configured to:
在接收到圆柱面展开指令后,确定展开时长、以及目标展开面图像与所述三维圆柱图像的第一映射关系;After receiving the cylindrical surface expansion instruction, determining an expansion duration, and a first mapping relationship between the target expansion surface image and the three-dimensional cylindrical image;
根据所述展开时长、以及所述第一映射关系,确定到达所述展开时长之前的每一时刻展开面图像与所述三维圆柱图像的第二映射关系;Determining, according to the expansion duration and the first mapping relationship, a second mapping relationship between the expansion surface image and the three-dimensional cylindrical image at each time before reaching the expansion duration;
针对到达所述展开时长之前的每一时刻,根据该时刻对应的第二映射关系,将所述三维圆柱图像进行映射,得到该时刻展开面图像;For each time before the expansion time is reached, the three-dimensional cylindrical image is mapped according to the second mapping relationship corresponding to the time, to obtain the time expansion surface image;
到达所述展开时长时,根据所述第一映射关系,将所述三维圆柱图像进行映射,得到所述目标展开面图像。When the expansion time is reached, the three-dimensional cylindrical image is mapped according to the first mapping relationship to obtain the target expansion surface image.
作为一种实施方式,第二映射模块1003,可以包括:计时子模块、第一确定子模块、判断子模块、第一映射子模块和第二映射子模块(图中未示出),其中,As an embodiment, the second mapping module 1003 may include: a timing submodule, a first determining submodule, a determining submodule, a first mapping submodule, and a second mapping submodule (not shown), where
计时子模块,用于在接收到圆柱面展开指令后,启动计时器,并确定展开时长;a timing sub-module, configured to start a timer after receiving a cylindrical expansion command, and determine an expansion time;
第一确定子模块,用于确定当前时刻下所述计时器中存储的时间值;a first determining submodule, configured to determine a time value stored in the timer at a current moment;
判断子模块,用于判断所存储的时间值是否小于所述展开时长;如果小于,触发第一映射子模块,如果大于等于,触发第二映射子模块;a determining sub-module, configured to determine whether the stored time value is less than the expansion time; if not, triggering the first mapping sub-module, if greater than or equal to, triggering the second mapping sub-module;
第一映射子模块,用于根据所存储的时间值对应的第三映射关系,将所述三维圆柱图像进行映射,得到所存储的时间值对应的展开曲面图像;其中,大于等于0且小于所述展开时长的每个时间值分别对应一份第三映射关系,一份第三映射关系为:三维圆柱坐标点与一个时间值对应的展开曲面图像坐标点的映射关系;a first mapping sub-module, configured to map the three-dimensional cylindrical image according to a third mapping relationship corresponding to the stored time value, to obtain an expanded surface image corresponding to the stored time value; wherein, greater than or equal to 0 and less than Each time value of the expansion time length corresponds to a third mapping relationship, and a third mapping relationship is: a mapping relationship between the coordinate points of the three-dimensional cylindrical coordinate points and the expanded surface image corresponding to a time value;
第二映射子模块,用于根据预先设定的三维圆柱坐标点与展开平面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开平面图像。The second mapping sub-module is configured to map the three-dimensional cylindrical image according to a mapping relationship between the preset three-dimensional cylindrical coordinate points and the developed planar image coordinate points, to obtain an expanded planar image.
作为一种实施方式,所述三维圆柱坐标点的坐标值包括:第一坐标值、第二坐标值和第三坐标值,所述一个时间值对应的展开曲面图像坐标点的坐标值包括:第四坐标值、第五坐标值和第六坐标值;In one embodiment, the coordinate values of the three-dimensional cylindrical coordinate points include: a first coordinate value, a second coordinate value, and a third coordinate value, and the coordinate values of the developed curved surface image coordinate points corresponding to the one time value include: Four coordinate values, fifth coordinate values, and sixth coordinate values;
所述第一映射子模块,具体用于:The first mapping submodule is specifically configured to:
针对所存储的每一时间值,计算该时间值与所述展开时长的比值;Calculating a ratio of the time value to the expansion time for each stored time value;
根据所述第一坐标值、所述第一坐标值与预设基准点之间的弧长以及所述比值,计算所映射到的第四坐标值;其中,所述弧长根据视点角度及所述三维圆柱的半径确定;Calculating the mapped fourth coordinate value according to the first coordinate value, the arc length between the first coordinate value and the preset reference point, and the ratio; wherein the arc length is according to the viewpoint angle and the Determining the radius of the three-dimensional cylinder;
将所述第二坐标值确定为所映射到的第五坐标值;Determining the second coordinate value as the fifth coordinate value to be mapped;
根据所述第三坐标值、所述三维圆柱的半径以及所述比值,计算所映射到的第六坐标值。The mapped sixth coordinate value is calculated according to the third coordinate value, the radius of the three-dimensional cylinder, and the ratio.
作为一种实施方式,所述第一映射子模块,具体用于:As an implementation manner, the first mapping submodule is specifically configured to:
针对所存储的每一时间值,计算该时间值与所述展开时长的比值;Calculating a ratio of the time value to the expansion time for each stored time value;
利用如下算式,进行计算:Calculate using the following formula:
所映射到的第四坐标值=第一坐标值+所述比值*[sign(第一坐标值)*所述第一坐标值与预设基准点之间的弧长-第一坐标值];The fourth coordinate value to be mapped = the first coordinate value + the ratio * [sign (first coordinate value) * the arc length between the first coordinate value and the preset reference point - the first coordinate value];
所述第一坐标值与预设基准点之间的弧长=所述三维圆柱的半径*(π-视点角度);An arc length between the first coordinate value and a preset reference point = a radius of the three-dimensional cylinder * (π - viewpoint angle);
所述视点角度=tan -1(第一坐标值的绝对值/第三坐标值); The viewpoint angle = tan -1 (absolute value of the first coordinate value / third coordinate value);
将所述第二坐标值确定为所映射到的第五坐标值;Determining the second coordinate value as the fifth coordinate value to be mapped;
所映射到的第六坐标值=第三坐标值+所述比值*(-所述三维圆柱的半径-第三坐标值)。The sixth coordinate value to be mapped = the third coordinate value + the ratio * (- the radius of the three-dimensional cylinder - the third coordinate value).
作为一种实施方式,所述三维圆柱坐标点的坐标值包括:第一坐标值、第二坐标值和第三坐标值,所述展开平面图像坐标点的坐标值包括:第七坐 标值、第八坐标值和第九坐标值;In one embodiment, the coordinate value of the three-dimensional cylindrical coordinate point includes: a first coordinate value, a second coordinate value, and a third coordinate value, and the coordinate value of the developed planar image coordinate point includes: a seventh coordinate value, Eight coordinate values and ninth coordinate values;
所述第二映射子模块,具体可以用于:The second mapping submodule may be specifically configured to:
根据所述第一坐标值、以及所述第一坐标值与预设基准点之间的弧长,计算所映射到的第七坐标值;其中,所述弧长根据视点角度及所述三维圆柱的半径确定;Calculating the mapped seventh coordinate value according to the first coordinate value and an arc length between the first coordinate value and the preset reference point; wherein the arc length is according to the viewpoint angle and the three-dimensional cylinder Radius determination;
将所述第二坐标值确定为所映射到的第八坐标值;Determining the second coordinate value as the eighth coordinate value to be mapped;
将所述三维圆柱的半径的相反数确定为映射到的第九坐标值。The inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
作为一种实施方式,所述第二映射子模块,具体可以用于:As an implementation manner, the second mapping submodule may be specifically configured to:
利用如下算式,进行计算:Calculate using the following formula:
第七坐标值=sign(第一坐标值)*所述第一坐标值与预设基准点之间的弧长;a seventh coordinate value=sign (first coordinate value)* an arc length between the first coordinate value and the preset reference point;
所述第一坐标值与预设基准点之间的弧长=所述三维圆柱的半径*(π-视点角度);An arc length between the first coordinate value and a preset reference point = a radius of the three-dimensional cylinder * (π - viewpoint angle);
所述视点角度=tan -1(第一坐标值的绝对值/第三坐标值); The viewpoint angle = tan -1 (absolute value of the first coordinate value / third coordinate value);
将所述第二坐标值确定为所映射到的第八坐标值;Determining the second coordinate value as the eighth coordinate value to be mapped;
将所述三维圆柱的半径的相反数确定为映射到的第九坐标值。The inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
作为一种实施方式,所述装置还可以包括:第一接收模块、第一确定模块和转动模块(图中未示出),其中,As an embodiment, the device may further include: a first receiving module, a first determining module, and a rotating module (not shown), wherein
第一接收模块,用于接收用户发送的转动圆柱指令;a first receiving module, configured to receive a rotating cylinder command sent by a user;
第一确定模块,用于确定所述转动圆柱指令对应的转动角度;a first determining module, configured to determine a rotation angle corresponding to the rotating cylinder instruction;
转动模块,用于以所述三维圆柱图像的中心线为轴,将所述三维圆柱图像转动所述转动角度。And a rotation module, configured to rotate the three-dimensional cylindrical image by the rotation angle by using a center line of the three-dimensional cylindrical image as an axis.
作为一种实施方式,所述装置还可以包括:第二接收模块、第二确定模块和第一调整模块(图中未示出),其中,As an embodiment, the device may further include: a second receiving module, a second determining module, and a first adjusting module (not shown), where
第二接收模块,用于接收用户发送的视点移动指令;a second receiving module, configured to receive a viewpoint moving instruction sent by the user;
第二确定模块,用于确定所述视点移动指令对应的视点角度与景深;a second determining module, configured to determine a viewpoint angle and a depth of field corresponding to the viewpoint moving instruction;
第一调整模块,用于根据所确定的视点角度与景深,对所述三维圆柱图像的进行调整。The first adjustment module is configured to adjust the three-dimensional cylindrical image according to the determined viewpoint angle and depth of field.
作为一种实施方式,所述装置还可以包括:第三接收模块、第三确定模块和第二调整模块(图中未示出),其中,As an embodiment, the device may further include: a third receiving module, a third determining module, and a second adjusting module (not shown), where
第三接收模块,用于接收用户发送的缩放指令;a third receiving module, configured to receive a scaling instruction sent by the user;
第三确定模块,用于确定所述缩放指令对应的目标景深;a third determining module, configured to determine a target depth of field corresponding to the scaling instruction;
第二调整模块,用于将所述三维圆柱图像的景深调整至所述目标景深。And a second adjustment module, configured to adjust a depth of field of the three-dimensional cylindrical image to the target depth of field.
作为一种实施方式,所述装置还可以包括:计时模块、第四确定模块、判断模块、第三调整模块和第四调整模块(图中未示出),其中,As an embodiment, the device may further include: a timing module, a fourth determining module, a determining module, a third adjusting module, and a fourth adjusting module (not shown), where
计时模块,用于在接收用户发送的缩放指令后,启动计时器,并确定缩放时长;a timing module, configured to start a timer after receiving a zoom instruction sent by the user, and determine a zoom duration;
第四确定模块,用于确定当前时刻下所述计时器中存储的时间值;a fourth determining module, configured to determine a time value stored in the timer at a current moment;
判断模块,用于判断所存储的时间值是否小于所述缩放时长;如果小于,触发第三调整模块,如果大于等于,触发第四调整模块;a judging module, configured to determine whether the stored time value is less than the zooming time length; if not, triggering the third adjusting module, if greater than or equal to, triggering the fourth adjusting module;
第三调整模块,包括:计算子模块和调整子模块,The third adjustment module includes: a calculation submodule and an adjustment submodule,
计算子模块,用于计算所存储的时间值对应的过渡景深,其中,大于等于0且小于所述第二预设数值的每一时间值对应一过渡景深,过渡景深位于所述三维圆柱图像的当前景深与所述目标景深之间;a calculation sub-module, configured to calculate a transition depth of field corresponding to the stored time value, wherein each time value greater than or equal to 0 and smaller than the second preset value corresponds to a transition depth of field, and the transition depth of field is located in the three-dimensional cylindrical image When the foreground is deep and the target depth of field;
调整子模块,用于将所述三维圆柱图像的景深调整至所述过渡景深;Adjusting a submodule for adjusting a depth of field of the three-dimensional cylindrical image to the transition depth of field;
第四调整模块,用于将所述三维圆柱图像的景深调整至所述目标景深。And a fourth adjustment module, configured to adjust a depth of field of the three-dimensional cylindrical image to the target depth of field.
作为一种实施方式,所述计算子模块,具体可以用于:As an implementation manner, the calculating submodule may be specifically used to:
利用如下算式,进行计算:Calculate using the following formula:
过渡景深=所存储的时间值/所述缩放时长*(目标景深-三维圆柱图像的当前景深)+三维圆柱图像的当前景深。Transition Depth of Field = stored time value / said zoom duration * (target depth of field - current depth of field of the 3D cylindrical image) + current depth of field of the 3D cylindrical image.
作为一种实施方式,所述装置还可以包括:第五确定模块、第六确定模块、复制模块和添加模块(图中未示出),其中,As an implementation manner, the apparatus may further include: a fifth determining module, a sixth determining module, a copying module, and an adding module (not shown), where
第五确定模块,用于根据所述映射关系,确定所述展开面图像的展开边缘线映射到所述三维圆柱图像中对应的位置;a fifth determining module, configured to determine, according to the mapping relationship, that an expanded edge line of the expanded plane image is mapped to a corresponding position in the three-dimensional cylindrical image;
第六确定模块,用于根据预设区域划分规则,在所述三维圆柱图像中,确定所述位置所在的区域;a sixth determining module, configured to determine an area where the location is located in the three-dimensional cylindrical image according to a preset area dividing rule;
复制模块,用于对所确定的区域进行复制,得到复制图像;a copy module for copying the determined area to obtain a duplicate image;
添加模块,用于根据所述映射关系,将所述复制图像添加到所述展开面图像中。And a adding module, configured to add the duplicate image to the expanded plane image according to the mapping relationship.
应用本申请图10所示实施例,将鱼眼图像映射到三维圆柱面上,得到三维圆柱图像,在接收到圆柱面展开指令后,将三维圆柱图像映射得到展开面图像;本方案中,三维圆柱图像的视觉效果比半球图像更好,而且如果用户 想要看到背面视角的图像区域,不需要手动转动该三维圆柱,只需要发送圆柱面展开指令,便可以看到展开面图像,展开面图像中包含了大视角的图像区域,因此,提高了图像的展示效果。Applying the embodiment shown in FIG. 10 of the present application, the fisheye image is mapped onto the three-dimensional cylindrical surface to obtain a three-dimensional cylindrical image, and after receiving the cylindrical surface expansion instruction, the three-dimensional cylindrical image is mapped to obtain a developed surface image; in the scheme, three-dimensional The visual effect of the cylindrical image is better than that of the hemisphere image, and if the user wants to see the image area of the back view, there is no need to manually rotate the three-dimensional cylinder, and only need to send a cylindrical expansion command to see the expansion surface image, the expansion surface The image contains an image area with a large viewing angle, thus improving the image display effect.
本申请实施例还提供了一种电子设备,如图11所示,包括处理器1101和存储器1102,The embodiment of the present application further provides an electronic device, as shown in FIG. 11, including a processor 1101 and a memory 1102.
存储器1102,用于存放计算机程序;a memory 1102, configured to store a computer program;
处理器1101,用于执行存储器1102上所存放的程序时,实现上述任一种鱼眼图像处理方法。The processor 1101 is configured to implement any of the above-described fisheye image processing methods when executing the program stored on the memory 1102.
上述电子设备提到的存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory mentioned in the above electronic device may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or may be a digital signal processing (DSP), dedicated integration. Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一种鱼眼图像处理方法。The embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, implements any of the above-described fisheye image processing methods.
本申请实施例还提供了一种可执行程序代码,所述可执行程序代码用于被运行以执行上述任一种鱼眼图像处理方法。The embodiment of the present application also provides an executable program code for being executed to execute any of the above-described fisheye image processing methods.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除 在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply such entities or operations. There is any such actual relationship or order between them. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element defined by the phrase "comprising a ..." does not exclude the presence of additional elements in the process, method, article, or device that comprises the element.
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于图10所示的鱼眼图像处理装置实施例、图11所示的电子设备实施例、上述计算机可读存储介质实施例、以及上述可执行程序代码实施例而言,由于其基本相似于图1-9所示的鱼眼图像处理方法实施例,所以描述的比较简单,相关之处参见图1-9所示的鱼眼图像处理方法实施例的部分说明即可。The various embodiments in the present specification are described in a related manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the fisheye image processing device embodiment shown in FIG. 10, the electronic device embodiment shown in FIG. 11, the computer readable storage medium embodiment, and the above-described executable program code embodiment are basically similar. In the embodiment of the fisheye image processing method shown in FIG. 1-9, the description is relatively simple, and the relevant parts can be referred to the description of the embodiment of the fisheye image processing method shown in FIG. 1-9.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., which are made within the spirit and principles of the present application, should be included in the present application. Within the scope of protection.

Claims (27)

  1. 一种鱼眼图像处理方法,其特征在于,所述方法包括:A fisheye image processing method, the method comprising:
    获取待处理鱼眼图像;Obtaining a fisheye image to be processed;
    根据预先设定的鱼眼图像坐标点与三维圆柱坐标点的映射关系,将所述待处理鱼眼图像映射到三维圆柱面上,得到三维圆柱图像;According to a mapping relationship between a preset fisheye image coordinate point and a three-dimensional cylindrical coordinate point, the fisheye image to be processed is mapped onto the three-dimensional cylindrical surface to obtain a three-dimensional cylindrical image;
    在接收到圆柱面展开指令后,根据预先设定的三维圆柱坐标点与展开面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开面图像。After receiving the cylindrical surface expansion command, the three-dimensional cylindrical image is mapped according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed surface image coordinate point to obtain a developed surface image.
  2. 根据权利要求1所述的方法,其特征在于,所述在接收到圆柱面展开指令后,根据预先设定的三维圆柱坐标点与展开面图像坐标点的映射关系,将所述三维圆柱图像映射到展开面上,得到展开面图像,包括:The method according to claim 1, wherein after receiving the cylindrical surface expansion command, the three-dimensional cylindrical image is mapped according to a mapping relationship between a preset three-dimensional cylindrical coordinate point and a developed surface image coordinate point. Go to the expansion surface and get the expanded surface image, including:
    在接收到圆柱面展开指令后,确定展开时长、以及目标展开面图像与所述三维圆柱图像的第一映射关系;After receiving the cylindrical surface expansion instruction, determining an expansion duration, and a first mapping relationship between the target expansion surface image and the three-dimensional cylindrical image;
    根据所述展开时长、以及所述第一映射关系,确定到达所述展开时长之前的每一时刻展开面图像与所述三维圆柱图像的第二映射关系;Determining, according to the expansion duration and the first mapping relationship, a second mapping relationship between the expansion surface image and the three-dimensional cylindrical image at each time before reaching the expansion duration;
    针对到达所述展开时长之前的每一时刻,根据该时刻对应的第二映射关系,将所述三维圆柱图像进行映射,得到该时刻展开面图像;For each time before the expansion time is reached, the three-dimensional cylindrical image is mapped according to the second mapping relationship corresponding to the time, to obtain the time expansion surface image;
    到达所述展开时长时,根据所述第一映射关系,将所述三维圆柱图像进行映射,得到所述目标展开面图像。When the expansion time is reached, the three-dimensional cylindrical image is mapped according to the first mapping relationship to obtain the target expansion surface image.
  3. 根据权利要求1所述的方法,其特征在于,所述在接收到圆柱面展开指令后,根据预先设定的三维圆柱坐标点与展开面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开面图像,包括:The method according to claim 1, wherein after receiving the cylindrical surface expansion command, the three-dimensional cylindrical image is performed according to a mapping relationship between a preset three-dimensional cylindrical coordinate point and an expansion surface image coordinate point. Map to get the expanded face image, including:
    在接收到圆柱面展开指令后,启动计时器,并确定展开时长;After receiving the cylindrical expansion command, start the timer and determine the expansion time;
    确定当前时刻下所述计时器中存储的时间值;Determining a time value stored in the timer at the current moment;
    判断所存储的时间值是否小于所述展开时长;Determining whether the stored time value is less than the expansion time;
    如果小于,根据所存储的时间值对应的第三映射关系,将所述三维圆柱图像进行映射,得到所存储的时间值对应的展开曲面图像;其中,大于等于0 且小于所述展开时长的每个时间值分别对应一份第三映射关系,一份第三映射关系为:三维圆柱坐标点与一个时间值对应的展开曲面图像坐标点的映射关系;If the value is smaller than the third mapping relationship corresponding to the stored time value, the three-dimensional cylindrical image is mapped to obtain the expanded surface image corresponding to the stored time value; wherein, each of the expansion time is greater than or equal to 0 The time values respectively correspond to a third mapping relationship, and a third mapping relationship is: a mapping relationship between the three-dimensional cylindrical coordinate points and a coordinate value of the expanded curved image corresponding to a time value;
    如果大于等于,根据预先设定的三维圆柱坐标点与展开平面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开平面图像。If it is greater than or equal to, the three-dimensional cylindrical image is mapped according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed planar image coordinate point, and an expanded planar image is obtained.
  4. 根据权利要求3所述的方法,其特征在于,所述三维圆柱坐标点的坐标值包括:第一坐标值、第二坐标值和第三坐标值,所述一个时间值对应的展开曲面图像坐标点的坐标值包括:第四坐标值、第五坐标值和第六坐标值;The method according to claim 3, wherein the coordinate values of the three-dimensional cylindrical coordinate points comprise: a first coordinate value, a second coordinate value, and a third coordinate value, and the expanded surface image coordinates corresponding to the one time value The coordinate values of the point include: a fourth coordinate value, a fifth coordinate value, and a sixth coordinate value;
    所述根根据所存储的时间值对应的第三映射关系,将所述三维圆柱图像进行映射,包括:Mapping, by the root, the three-dimensional cylindrical image according to the third mapping relationship corresponding to the stored time value, including:
    针对所存储的每一时间值,计算该时间值与所述展开时长的比值;Calculating a ratio of the time value to the expansion time for each stored time value;
    根据所述第一坐标值、所述第一坐标值与预设基准点之间的弧长以及所述比值,计算所映射到的第四坐标值;其中,所述弧长根据视点角度及所述三维圆柱的半径确定;Calculating the mapped fourth coordinate value according to the first coordinate value, the arc length between the first coordinate value and the preset reference point, and the ratio; wherein the arc length is according to the viewpoint angle and the Determining the radius of the three-dimensional cylinder;
    将所述第二坐标值确定为所映射到的第五坐标值;Determining the second coordinate value as the fifth coordinate value to be mapped;
    根据所述第三坐标值、所述三维圆柱的半径以及所述比值,计算所映射到的第六坐标值。The mapped sixth coordinate value is calculated according to the third coordinate value, the radius of the three-dimensional cylinder, and the ratio.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述第一坐标值、所述第一坐标值与预设基准点之间的弧长以及所述比值,计算所映射到的第四坐标值,包括:The method according to claim 4, wherein said calculating the mapped number according to said first coordinate value, an arc length between said first coordinate value and a preset reference point, and said ratio Four coordinate values, including:
    所映射到的第四坐标值=第一坐标值+所述比值*[sign(第一坐标值)*所述第一坐标值与预设基准点之间的弧长-第一坐标值];The fourth coordinate value to be mapped = the first coordinate value + the ratio * [sign (first coordinate value) * the arc length between the first coordinate value and the preset reference point - the first coordinate value];
    所述第一坐标值与预设基准点之间的弧长=所述三维圆柱的半径*(π-视点角度);An arc length between the first coordinate value and a preset reference point = a radius of the three-dimensional cylinder * (π - viewpoint angle);
    所述视点角度=tan -1(第一坐标值的绝对值/第三坐标值); The viewpoint angle = tan -1 (absolute value of the first coordinate value / third coordinate value);
    所述根据所述第三坐标值、所述三维圆柱的半径以及所述比值,计算所 映射到的第六坐标值,包括:And calculating, according to the third coordinate value, the radius of the three-dimensional cylinder, and the ratio, the mapped sixth coordinate value, including:
    所映射到的第六坐标值=第三坐标值+所述比值*(-所述三维圆柱的半径-第三坐标值)。The sixth coordinate value to be mapped = the third coordinate value + the ratio * (- the radius of the three-dimensional cylinder - the third coordinate value).
  6. 根据权利要求3所述的方法,其特征在于,所述三维圆柱坐标点的坐标值包括:第一坐标值、第二坐标值和第三坐标值,所述展开平面图像坐标点的坐标值包括:第七坐标值、第八坐标值和第九坐标值;The method according to claim 3, wherein the coordinate values of the three-dimensional cylindrical coordinate points comprise: a first coordinate value, a second coordinate value, and a third coordinate value, and the coordinate values of the expanded planar image coordinate point include : a seventh coordinate value, an eighth coordinate value, and a ninth coordinate value;
    所述根据预先设定的三维圆柱坐标点与展开平面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开平面图像,包括:And mapping the three-dimensional cylindrical image according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed planar image coordinate point, to obtain an expanded planar image, including:
    根据所述第一坐标值、以及所述第一坐标值与预设基准点之间的弧长,计算所映射到的第七坐标值;其中,所述弧长根据视点角度及所述三维圆柱的半径确定;Calculating the mapped seventh coordinate value according to the first coordinate value and an arc length between the first coordinate value and the preset reference point; wherein the arc length is according to the viewpoint angle and the three-dimensional cylinder Radius determination;
    将所述第二坐标值确定为所映射到的第八坐标值;Determining the second coordinate value as the eighth coordinate value to be mapped;
    将所述三维圆柱的半径的相反数确定为映射到的第九坐标值。The inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述第一坐标值、以及所述第一坐标值与预设基准点之间的弧长,计算所映射到的第七坐标值,包括:The method according to claim 6, wherein the calculating the mapped seventh coordinate value according to the first coordinate value and the arc length between the first coordinate value and the preset reference point ,include:
    第七坐标值=sign(第一坐标值)*所述第一坐标值与预设基准点之间的弧长;a seventh coordinate value=sign (first coordinate value)* an arc length between the first coordinate value and the preset reference point;
    所述第一坐标值与预设基准点之间的弧长=所述三维圆柱的半径*(π-视点角度);An arc length between the first coordinate value and a preset reference point = a radius of the three-dimensional cylinder * (π - viewpoint angle);
    所述视点角度=tan -1(第一坐标值的绝对值/第三坐标值)。 The viewpoint angle = tan -1 (absolute value of the first coordinate value / third coordinate value).
  8. 根据权利要求1所述的方法,其特征在于,在所述得到三维圆柱图像之后,还包括:The method according to claim 1, wherein after the obtaining the three-dimensional cylindrical image, the method further comprises:
    接收用户发送的转动圆柱指令;确定所述转动圆柱指令对应的转动角度;以所述三维圆柱图像的中心线为轴,将所述三维圆柱图像转动所述转动角度;Receiving a rotation cylinder command sent by the user; determining a rotation angle corresponding to the rotation cylinder instruction; rotating the three-dimensional cylinder image by the rotation angle by using a center line of the three-dimensional cylindrical image as an axis;
    或者,or,
    接收用户发送的视点移动指令;确定所述视点移动指令对应的视点角度与景深;根据所确定的视点角度与景深,对所述三维圆柱图像的进行调整。Receiving a viewpoint movement instruction sent by the user; determining a viewpoint angle and a depth of field corresponding to the viewpoint movement instruction; and adjusting the three-dimensional cylindrical image according to the determined viewpoint angle and depth of field.
  9. 根据权利要求1所述的方法,其特征在于,在所述得到三维圆柱图像之后,还包括:The method according to claim 1, wherein after the obtaining the three-dimensional cylindrical image, the method further comprises:
    接收用户发送的缩放指令;Receiving a zoom instruction sent by the user;
    确定所述缩放指令对应的目标景深;Determining a target depth of field corresponding to the scaling instruction;
    将所述三维圆柱图像的景深调整至所述目标景深。The depth of field of the three-dimensional cylindrical image is adjusted to the target depth of field.
  10. 根据权利要求9所述的方法,其特征在于,在接收用户发送的缩放指令后,还包括:启动计时器,并确定缩放时长;The method according to claim 9, wherein after receiving the scaling instruction sent by the user, the method further comprises: starting a timer and determining a zooming duration;
    所述将所述三维圆柱图像的景深调整至所述目标景深,包括:Adjusting the depth of field of the three-dimensional cylindrical image to the target depth of field includes:
    确定当前时刻下所述计时器中存储的时间值;Determining a time value stored in the timer at the current moment;
    判断所存储的时间值是否小于所述缩放时长;Determining whether the stored time value is less than the scaling time;
    如果小于,计算所存储的时间值对应的过渡景深,其中,大于等于0且小于所述缩放时长的每一时间值对应一过渡景深,过渡景深位于所述三维圆柱图像的当前景深与所述目标景深之间;将所述三维圆柱图像的景深调整至所述过渡景深;If the value is less than, the transition depth of field corresponding to the stored time value is calculated, wherein each time value greater than or equal to 0 and less than the zoom duration corresponds to a transition depth of field, and the transition depth of field is located at the current depth of field of the three-dimensional cylindrical image and the target Between the depths of field; adjusting the depth of field of the three-dimensional cylindrical image to the transition depth of field;
    如果大于等于,将所述三维圆柱图像的景深调整至所述目标景深。If it is greater than or equal to, the depth of field of the three-dimensional cylindrical image is adjusted to the target depth of field.
  11. 根据权利要求10所述的方法,其特征在于,所述计算所存储的时间值对应的过渡景深,包括:The method according to claim 10, wherein the calculating the transition depth of field corresponding to the stored time value comprises:
    过渡景深=所存储的时间值/所述缩放时长*(目标景深-三维圆柱图像的当前景深)+三维圆柱图像的当前景深。Transition Depth of Field = stored time value / said zoom duration * (target depth of field - current depth of field of the 3D cylindrical image) + current depth of field of the 3D cylindrical image.
  12. 根据权利要求1所述的方法,其特征在于,在所述根据预先设定的三维圆柱坐标点与展开面图像坐标点的映射关系,将所述三维圆柱图像映射到展开面上,得到展开面图像之后,还包括:The method according to claim 1, wherein the three-dimensional cylindrical image is mapped onto the expansion surface according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed surface image coordinate point, and the expansion surface is obtained. After the image, it also includes:
    根据所述映射关系,确定所述展开面图像的展开边缘线映射到所述三维圆柱图像中对应的位置;Determining, according to the mapping relationship, that the expanded edge line of the expanded plane image is mapped to a corresponding position in the three-dimensional cylindrical image;
    根据预设区域划分规则,在所述三维圆柱图像中,确定所述位置所在的区域;Determining, in the three-dimensional cylindrical image, an area in which the location is located according to a preset area division rule;
    对所确定的区域进行复制,得到复制图像;Copying the determined area to obtain a duplicate image;
    根据所述映射关系,将所述复制图像添加到所述展开面图像中。The duplicate image is added to the expanded plane image according to the mapping relationship.
  13. 一种鱼眼图像处理装置,其特征在于,所述装置包括:A fisheye image processing apparatus, characterized in that the apparatus comprises:
    获取模块,用于获取待处理鱼眼图像;Obtaining a module, configured to obtain a fisheye image to be processed;
    第一映射模块,用于根据预先设定的鱼眼图像坐标点与三维圆柱坐标点的映射关系,将所述待处理鱼眼图像映射到三维圆柱面上,得到三维圆柱图像;a first mapping module, configured to map the image of the fisheye to be processed to a three-dimensional cylindrical surface according to a mapping relationship between a preset fisheye image coordinate point and a three-dimensional cylindrical coordinate point, to obtain a three-dimensional cylindrical image;
    第二映射模块,用于在接收到圆柱面展开指令后,根据预先设定的三维圆柱坐标点与展开面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开面图像。The second mapping module is configured to map the three-dimensional cylindrical image according to a mapping relationship between the preset three-dimensional cylindrical coordinate point and the developed surface image coordinate point after receiving the cylindrical surface expansion instruction, to obtain a developed surface image.
  14. 根据权利要求13所述的装置,其特征在于,所述第二映射模块,具体用于:The device according to claim 13, wherein the second mapping module is specifically configured to:
    在接收到圆柱面展开指令后,确定展开时长、以及目标展开面图像与所述三维圆柱图像的第一映射关系;After receiving the cylindrical surface expansion instruction, determining an expansion duration, and a first mapping relationship between the target expansion surface image and the three-dimensional cylindrical image;
    根据所述展开时长、以及所述第一映射关系,确定到达所述展开时长之前的每一时刻展开面图像与所述三维圆柱图像的第二映射关系;Determining, according to the expansion duration and the first mapping relationship, a second mapping relationship between the expansion surface image and the three-dimensional cylindrical image at each time before reaching the expansion duration;
    针对到达所述展开时长之前的每一时刻,根据该时刻对应的第二映射关系,将所述三维圆柱图像进行映射,得到该时刻展开面图像;For each time before the expansion time is reached, the three-dimensional cylindrical image is mapped according to the second mapping relationship corresponding to the time, to obtain the time expansion surface image;
    到达所述展开时长时,根据所述第一映射关系,将所述三维圆柱图像进行映射,得到所述目标展开面图像。When the expansion time is reached, the three-dimensional cylindrical image is mapped according to the first mapping relationship to obtain the target expansion surface image.
  15. 根据权利要求13所述的装置,其特征在于,所述第二映射模块,包括:The apparatus according to claim 13, wherein the second mapping module comprises:
    计时子模块,用于在接收到圆柱面展开指令后,启动计时器,并确定展开时长;a timing sub-module, configured to start a timer after receiving a cylindrical expansion command, and determine an expansion time;
    第一确定子模块,用于确定当前时刻下所述计时器中存储的时间值;a first determining submodule, configured to determine a time value stored in the timer at a current moment;
    判断子模块,用于判断所存储的时间值是否小于所述展开时长;如果小于,触发第一映射子模块,如果大于等于,触发第二映射子模块;a determining sub-module, configured to determine whether the stored time value is less than the expansion time; if not, triggering the first mapping sub-module, if greater than or equal to, triggering the second mapping sub-module;
    第一映射子模块,用于根据所存储的时间值对应的第三映射关系,将所述三维圆柱图像进行映射,得到所存储的时间值对应的展开曲面图像;其中,大于等于0且小于所述展开时长的每个时间值分别对应一份第三映射关系,一份第三映射关系为:三维圆柱坐标点与一个时间值对应的展开曲面图像坐标点的映射关系;a first mapping sub-module, configured to map the three-dimensional cylindrical image according to a third mapping relationship corresponding to the stored time value, to obtain an expanded surface image corresponding to the stored time value; wherein, greater than or equal to 0 and less than Each time value of the expansion time length corresponds to a third mapping relationship, and a third mapping relationship is: a mapping relationship between the coordinate points of the three-dimensional cylindrical coordinate points and the expanded surface image corresponding to a time value;
    第二映射子模块,用于根据预先设定的三维圆柱坐标点与展开平面图像坐标点的映射关系,将所述三维圆柱图像进行映射,得到展开平面图像。The second mapping sub-module is configured to map the three-dimensional cylindrical image according to a mapping relationship between the preset three-dimensional cylindrical coordinate points and the developed planar image coordinate points, to obtain an expanded planar image.
  16. 根据权利要求15所述的装置,其特征在于,所述三维圆柱坐标点的坐标值包括:第一坐标值、第二坐标值和第三坐标值,所述一个时间值对应的展开曲面图像坐标点的坐标值包括:第四坐标值、第五坐标值和第六坐标值;The apparatus according to claim 15, wherein the coordinate values of the three-dimensional cylindrical coordinate points comprise: a first coordinate value, a second coordinate value, and a third coordinate value, and the expanded surface image coordinates corresponding to the one time value The coordinate values of the point include: a fourth coordinate value, a fifth coordinate value, and a sixth coordinate value;
    所述第一映射子模块,具体用于:The first mapping submodule is specifically configured to:
    针对所存储的每一时间值,计算该时间值与所述展开时长的比值;Calculating a ratio of the time value to the expansion time for each stored time value;
    根据所述第一坐标值、所述第一坐标值与预设基准点之间的弧长以及所述比值,计算所映射到的第四坐标值;其中,所述弧长根据视点角度及所述三维圆柱的半径确定;Calculating the mapped fourth coordinate value according to the first coordinate value, the arc length between the first coordinate value and the preset reference point, and the ratio; wherein the arc length is according to the viewpoint angle and the Determining the radius of the three-dimensional cylinder;
    将所述第二坐标值确定为所映射到的第五坐标值;Determining the second coordinate value as the fifth coordinate value to be mapped;
    根据所述第三坐标值、所述三维圆柱的半径以及所述比值,计算所映射到的第六坐标值。The mapped sixth coordinate value is calculated according to the third coordinate value, the radius of the three-dimensional cylinder, and the ratio.
  17. 根据权利要求16所述的装置,其特征在于,所述第一映射子模块,具体用于:The device according to claim 16, wherein the first mapping submodule is specifically configured to:
    针对所存储的每一时间值,计算该时间值与所述展开时长的比值;Calculating a ratio of the time value to the expansion time for each stored time value;
    利用如下算式,进行计算:Calculate using the following formula:
    所映射到的第四坐标值=第一坐标值+所述比值*[sign(第一坐标值)*所述第一坐标值与预设基准点之间的弧长-第一坐标值];The fourth coordinate value to be mapped = the first coordinate value + the ratio * [sign (first coordinate value) * the arc length between the first coordinate value and the preset reference point - the first coordinate value];
    所述第一坐标值与预设基准点之间的弧长=所述三维圆柱的半径*(π-视点角度);An arc length between the first coordinate value and a preset reference point = a radius of the three-dimensional cylinder * (π - viewpoint angle);
    所述视点角度=tan -1(第一坐标值的绝对值/第三坐标值); The viewpoint angle = tan -1 (absolute value of the first coordinate value / third coordinate value);
    将所述第二坐标值确定为所映射到的第五坐标值;Determining the second coordinate value as the fifth coordinate value to be mapped;
    所映射到的第六坐标值=第三坐标值+所述比值*(-所述三维圆柱的半径-第三坐标值)。The sixth coordinate value to be mapped = the third coordinate value + the ratio * (- the radius of the three-dimensional cylinder - the third coordinate value).
  18. 根据权利要求15所述的装置,其特征在于,所述三维圆柱坐标点的坐标值包括:第一坐标值、第二坐标值和第三坐标值,所述展开平面图像坐标点的坐标值包括:第七坐标值、第八坐标值和第九坐标值;The apparatus according to claim 15, wherein the coordinate values of the three-dimensional cylindrical coordinate points comprise: a first coordinate value, a second coordinate value, and a third coordinate value, and the coordinate values of the expanded planar image coordinate point include : a seventh coordinate value, an eighth coordinate value, and a ninth coordinate value;
    所述第二映射子模块,具体用于:The second mapping submodule is specifically configured to:
    根据所述第一坐标值、以及所述第一坐标值与预设基准点之间的弧长,计算所映射到的第七坐标值;其中,所述弧长根据视点角度及所述三维圆柱的半径确定;Calculating the mapped seventh coordinate value according to the first coordinate value and an arc length between the first coordinate value and the preset reference point; wherein the arc length is according to the viewpoint angle and the three-dimensional cylinder Radius determination;
    将所述第二坐标值确定为所映射到的第八坐标值;Determining the second coordinate value as the eighth coordinate value to be mapped;
    将所述三维圆柱的半径的相反数确定为映射到的第九坐标值。The inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
  19. 根据权利要求18所述的装置,其特征在于,所述第二映射子模块,具体用于:利用如下算式,进行计算:The device according to claim 18, wherein the second mapping sub-module is specifically configured to perform calculation by using the following formula:
    第七坐标值=sign(第一坐标值)*所述第一坐标值与预设基准点之间的弧长;a seventh coordinate value=sign (first coordinate value)* an arc length between the first coordinate value and the preset reference point;
    所述第一坐标值与预设基准点之间的弧长=所述三维圆柱的半径*(π-视点角度);An arc length between the first coordinate value and a preset reference point = a radius of the three-dimensional cylinder * (π - viewpoint angle);
    所述视点角度=tan -1(第一坐标值的绝对值/第三坐标值); The viewpoint angle = tan -1 (absolute value of the first coordinate value / third coordinate value);
    将所述第二坐标值确定为所映射到的第八坐标值;Determining the second coordinate value as the eighth coordinate value to be mapped;
    将所述三维圆柱的半径的相反数确定为映射到的第九坐标值。The inverse of the radius of the three-dimensional cylinder is determined as the ninth coordinate value to which the mapping is made.
  20. 根据权利要求13所述的装置,其特征在于,所述装置还包括:第一接收模块、第一确定模块和转动模块,或者,所述装置还包括:第二接收模块、第二确定模块和第一调整模块,其中,The device according to claim 13, wherein the device further comprises: a first receiving module, a first determining module, and a rotating module, or the device further comprises: a second receiving module, a second determining module, and a first adjustment module, wherein
    第一接收模块,用于接收用户发送的转动圆柱指令;a first receiving module, configured to receive a rotating cylinder command sent by a user;
    第一确定模块,用于确定所述转动圆柱指令对应的转动角度;a first determining module, configured to determine a rotation angle corresponding to the rotating cylinder instruction;
    转动模块,用于以所述三维圆柱图像的中心线为轴,将所述三维圆柱图像转动所述转动角度;a rotation module, configured to rotate the three-dimensional cylindrical image by the rotation angle by using a center line of the three-dimensional cylindrical image as an axis;
    第二接收模块,用于接收用户发送的视点移动指令;a second receiving module, configured to receive a viewpoint moving instruction sent by the user;
    第二确定模块,用于确定所述视点移动指令对应的视点角度与景深;a second determining module, configured to determine a viewpoint angle and a depth of field corresponding to the viewpoint moving instruction;
    第一调整模块,用于根据所确定的视点角度与景深,对所述三维圆柱图像的进行调整。The first adjustment module is configured to adjust the three-dimensional cylindrical image according to the determined viewpoint angle and depth of field.
  21. 根据权利要求13所述的装置,其特征在于,所述装置还包括:The device according to claim 13, wherein the device further comprises:
    第三接收模块,用于接收用户发送的缩放指令;a third receiving module, configured to receive a scaling instruction sent by the user;
    第三确定模块,用于确定所述缩放指令对应的目标景深;a third determining module, configured to determine a target depth of field corresponding to the scaling instruction;
    第二调整模块,用于将所述三维圆柱图像的景深调整至所述目标景深。And a second adjustment module, configured to adjust a depth of field of the three-dimensional cylindrical image to the target depth of field.
  22. 根据权利要求21所述的装置,其特征在于,所述装置还包括:The device of claim 21, wherein the device further comprises:
    计时模块,用于在接收用户发送的缩放指令后,启动计时器,并确定缩放时长;a timing module, configured to start a timer after receiving a zoom instruction sent by the user, and determine a zoom duration;
    第四确定模块,用于确定当前时刻下所述计时器中存储的时间值;a fourth determining module, configured to determine a time value stored in the timer at a current moment;
    判断模块,用于判断所存储的时间值是否小于所述缩放时长;如果小于,触发第三调整模块,如果大于等于,触发第四调整模块;a judging module, configured to determine whether the stored time value is less than the zooming time length; if not, triggering the third adjusting module, if greater than or equal to, triggering the fourth adjusting module;
    第三调整模块,包括:计算子模块和调整子模块,The third adjustment module includes: a calculation submodule and an adjustment submodule,
    计算子模块,用于计算所存储的时间值对应的过渡景深,其中,大于等于0且小于所述缩放时长的每一时间值对应一过渡景深,过渡景深位于所述三 维圆柱图像的当前景深与所述目标景深之间;a calculation sub-module, configured to calculate a transition depth of field corresponding to the stored time value, wherein each time value greater than or equal to 0 and less than the zoom duration corresponds to a transition depth of field, and the transition depth of field is located at a current depth of field of the three-dimensional cylindrical image Between the target depths of field;
    调整子模块,用于将所述三维圆柱图像的景深调整至所述过渡景深;Adjusting a submodule for adjusting a depth of field of the three-dimensional cylindrical image to the transition depth of field;
    第四调整模块,用于将所述三维圆柱图像的景深调整至所述目标景深。And a fourth adjustment module, configured to adjust a depth of field of the three-dimensional cylindrical image to the target depth of field.
  23. 根据权利要求22所述的装置,其特征在于,所述计算子模块,具体用于:利用如下算式,进行计算:The device according to claim 22, wherein the calculation sub-module is specifically configured to perform calculation by using the following formula:
    过渡景深=所存储的时间值/所述缩放时长*(目标景深-三维圆柱图像的当前景深)+三维圆柱图像的当前景深。Transition Depth of Field = stored time value / said zoom duration * (target depth of field - current depth of field of the 3D cylindrical image) + current depth of field of the 3D cylindrical image.
  24. 根据权利要求13所述的装置,其特征在于,所述装置还包括:The device according to claim 13, wherein the device further comprises:
    第五确定模块,用于根据所述映射关系,确定所述展开面图像的展开边缘线映射到所述三维圆柱图像中对应的位置;a fifth determining module, configured to determine, according to the mapping relationship, that an expanded edge line of the expanded plane image is mapped to a corresponding position in the three-dimensional cylindrical image;
    第六确定模块,用于根据预设区域划分规则,在所述三维圆柱图像中,确定所述位置所在的区域;a sixth determining module, configured to determine an area where the location is located in the three-dimensional cylindrical image according to a preset area dividing rule;
    复制模块,用于对所确定的区域进行复制,得到复制图像;a copy module for copying the determined area to obtain a duplicate image;
    添加模块,用于根据所述映射关系,将所述复制图像添加到所述展开面图像中。And a adding module, configured to add the duplicate image to the expanded plane image according to the mapping relationship.
  25. 一种电子设备,其特征在于,包括处理器和存储器;An electronic device, comprising: a processor and a memory;
    存储器,用于存放计算机程序;a memory for storing a computer program;
    处理器,用于执行存储器上所存放的程序时,实现权利要求1-12任一所述的方法步骤。The processor, when executed to execute a program stored on the memory, implements the method steps of any of claims 1-12.
  26. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-12任一所述的方法步骤。A computer readable storage medium, wherein the computer readable storage medium stores a computer program, the computer program being executed by a processor to implement the method steps of any of claims 1-12.
  27. 一种可执行程序代码,其特征在于,所述可执行程序代码用于被运行以执行权利要求1-12任一所述的方法步骤。An executable program code, characterized in that the executable program code is operative to perform the method steps of any of claims 1-12.
PCT/CN2018/116356 2017-11-20 2018-11-20 Fisheye image processing method and apparatus, and electronic device WO2019096323A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711156272.0 2017-11-20
CN201711156272.0A CN109816587B (en) 2017-11-20 2017-11-20 Fisheye image processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
WO2019096323A1 true WO2019096323A1 (en) 2019-05-23

Family

ID=66538869

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116356 WO2019096323A1 (en) 2017-11-20 2018-11-20 Fisheye image processing method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN109816587B (en)
WO (1) WO2019096323A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112132740A (en) * 2019-06-25 2020-12-25 杭州海康威视数字技术股份有限公司 Video image display method, device and system

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112116530B (en) * 2019-06-19 2023-08-18 杭州海康威视数字技术股份有限公司 Fisheye image distortion correction method, device and virtual display system
CN111681160B (en) * 2020-05-28 2021-07-06 深圳市无虚科技有限公司 Curved image restoration method, device and equipment and readable storage medium
CN111813290B (en) * 2020-09-09 2020-12-01 武汉中科通达高新技术股份有限公司 Data processing method and device and electronic equipment
CN112446823B (en) * 2021-02-01 2021-04-27 武汉中科通达高新技术股份有限公司 Monitoring image display method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130177258A1 (en) * 2008-09-03 2013-07-11 Dai Nippon Printing Co., Ltd. Image converter
CN105488775A (en) * 2014-10-09 2016-04-13 东北大学 Six-camera around looking-based cylindrical panoramic generation device and method
CN105825470A (en) * 2016-03-10 2016-08-03 广州欧科信息技术股份有限公司 Fisheye image correction method base on point cloud image

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6515664B1 (en) * 1999-11-12 2003-02-04 Pixaround.Com Pte Ltd Fast single-pass cylindrical to planar projection
JP2003141562A (en) * 2001-10-29 2003-05-16 Sony Corp Image processing apparatus and method for nonplanar image, storage medium, and computer program
CN1266653C (en) * 2002-12-26 2006-07-26 联想(北京)有限公司 Method for displaying three-dimensional image
US8325187B2 (en) * 2009-10-22 2012-12-04 Samsung Electronics Co., Ltd. Method and device for real time 3D navigation in panoramic images and cylindrical spaces
CN102780834A (en) * 2011-05-11 2012-11-14 张茂军 Semi-cylindrical panorama upwrapping method of pano-eye image
CN105809615A (en) * 2016-03-10 2016-07-27 广州欧科信息技术股份有限公司 Point cloud data imaging method
CN106384330B (en) * 2016-09-21 2022-02-15 深圳看到科技有限公司 Panoramic picture playing method and panoramic picture playing device
CN107133912A (en) * 2017-04-01 2017-09-05 纵目科技(上海)股份有限公司 Panoramic parking image distortion correction method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130177258A1 (en) * 2008-09-03 2013-07-11 Dai Nippon Printing Co., Ltd. Image converter
CN105488775A (en) * 2014-10-09 2016-04-13 东北大学 Six-camera around looking-based cylindrical panoramic generation device and method
CN105825470A (en) * 2016-03-10 2016-08-03 广州欧科信息技术股份有限公司 Fisheye image correction method base on point cloud image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112132740A (en) * 2019-06-25 2020-12-25 杭州海康威视数字技术股份有限公司 Video image display method, device and system
CN112132740B (en) * 2019-06-25 2023-08-25 杭州海康威视数字技术股份有限公司 Video image display method, device and system

Also Published As

Publication number Publication date
CN109816587A (en) 2019-05-28
CN109816587B (en) 2021-04-16

Similar Documents

Publication Publication Date Title
WO2019096323A1 (en) Fisheye image processing method and apparatus, and electronic device
US11017580B2 (en) Face image processing based on key point detection
CN108537721B (en) Panoramic image processing method and device and electronic equipment
US10748348B2 (en) Method, apparatus and electronic device for displaying an image and storage medium
WO2020001014A1 (en) Image beautification method and apparatus, and electronic device
US9411415B2 (en) Method and apparatus for displaying data
US20180240223A1 (en) Three dimensional image fusion method and device and non-transitory computer-readable medium
KR20190026876A (en) Method and apparatus for mapping to spherical panoramic images
WO2019242271A1 (en) Image warping method and apparatus, and electronic device
US10317777B2 (en) Automatic zooming method and apparatus
WO2009104062A2 (en) Selecting a layout
WO2015149498A1 (en) Method and device for switching screen modes, computer storage medium and equipment
WO2019019372A1 (en) Picture operation and control method and device for mobile terminal, mobile terminal, and medium
WO2019051785A1 (en) Icon display method and device for intelligent terminal
WO2019237746A1 (en) Image merging method and apparatus
US20190206098A1 (en) Method For Defining Drawing Planes For The Design Of A 3D Object
WO2020029556A1 (en) Plane adaptation method and device, and computer readable storage medium
CN109146775B (en) Two-dimensional picture conversion method, device, equipment and storage medium
WO2015062176A1 (en) Multipoint touch-control multimedia spherical-screen demonstration instrument and multipoint touch-control method therefor
JP2013080466A (en) Method and device for processing document image
KR20150039049A (en) Method and Apparatus For Providing A User Interface According to Size of Template Edit Frame
US9082223B2 (en) Smooth manipulation of three-dimensional objects
CN115002338B (en) Shooting parameter control method and device
JP6207023B2 (en) Rotate objects on the screen
JP7335726B2 (en) Information display device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18878187

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 18878187

Country of ref document: EP

Kind code of ref document: A1