CN110490820A - Image processing method and device, electronic equipment, storage medium - Google Patents

Image processing method and device, electronic equipment, storage medium Download PDF

Info

Publication number
CN110490820A
CN110490820A CN201910726220.5A CN201910726220A CN110490820A CN 110490820 A CN110490820 A CN 110490820A CN 201910726220 A CN201910726220 A CN 201910726220A CN 110490820 A CN110490820 A CN 110490820A
Authority
CN
China
Prior art keywords
described image
image frame
distortion
pixel
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910726220.5A
Other languages
Chinese (zh)
Other versions
CN110490820B (en
Inventor
张海平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910726220.5A priority Critical patent/CN110490820B/en
Publication of CN110490820A publication Critical patent/CN110490820A/en
Application granted granted Critical
Publication of CN110490820B publication Critical patent/CN110490820B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction

Landscapes

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

Abstract

This application involves a kind of image processing methods, comprising: during virtual reality device work, judges whether picture frame to be output in the virtual reality device needs to correct;When judgement described image frame needs timing, to the reversed distortion processing of described image frame progress;When determining that described image frame do not need timing, distortion processing is not done to described image frame or carries out positive distortion processing.Disclosed herein as well is a kind of image processing apparatus, electronic equipment and computer readable storage mediums.The application selectively corrects the deformation of picture caused by optical lens, so that picture preferably meets environmental demand, enhances the feeling of immersion virtually with reality.

Description

Image processing method and device, electronic equipment, storage medium
Technical field
This application involves technical field of electronic equipment, more particularly to a kind of image processing method and device, electronic equipment, Computer readable storage medium.
Background technique
With the continuous development of electronic science and technology and computer graphics techniques, the electronic multimedias such as the mankind and computer are set Standby interactive means become more and more abundant, and virtual reality technology is the interaction technique gradually to move to maturity in recent years.Virtually Reality technology is a kind of synthesis skill that computer technology, emulation technology, graphics technology, sensing measurement technology are integrated in one Art has many advantages, such as low cost, high security, can operate repeatedly using virtual three-dimension interaction environment as essential characteristic.
In virtual reality device, the general field range to be extended one's service using optical lens is immersed with bringing for user Property, interactivity and the imagination property experience.But optical lens will lead to picture and be deformed.
Summary of the invention
The embodiment of the present application provides a kind of image processing method and device, electronic equipment, computer readable storage medium, has The deformation of picture caused by optical lens is selectively corrected, so that picture preferably meets environmental demand, is enhanced virtually and existing Real feeling of immersion.
A kind of image processing method, which comprises
During virtual reality device work, judge whether picture frame to be output in the virtual reality device needs It corrects;
When judgement described image frame needs timing, to the reversed distortion processing of described image frame progress;
When determining that described image frame do not need timing, distortion processing is not done to described image frame or is carried out at positive distortion Reason;
Wherein, the reversed distortion processing be with distort caused by the eyeglass of the virtual reality device it is contrary abnormal Change processing, the forward direction distortion processing are at distortion identical with distortion direction caused by the eyeglass of the virtual reality device Reason.
A kind of image processing apparatus, described device include:
Judgment module, for judging to be output in the virtual reality device during virtual reality device work Picture frame whether need to correct;
Reversed distortion module reversely distorts to described image frame for needing timing when judgement described image frame Processing;
Forward direction distortion module does not do at distortion described image frame for not needing timing when judgement described image frame Reason carries out positive distortion processing;
Wherein, the reversed distortion processing be with distort caused by the eyeglass of the virtual reality device it is contrary abnormal Change processing, the forward direction distortion processing are at distortion identical with distortion direction caused by the eyeglass of the virtual reality device Reason.
A kind of electronic equipment, the electronic equipment include memory and processor, store computer in the memory Program, when the computer program is executed by the processor, so that the processor executes following steps:
During virtual reality device work, judge whether picture frame to be output in the virtual reality device needs It corrects;
When judgement described image frame needs timing, to the reversed distortion processing of described image frame progress;
When determining that described image frame do not need timing, distortion processing is not done to described image frame or is carried out at positive distortion Reason;
Wherein, the reversed distortion processing be with distort caused by the eyeglass of the virtual reality device it is contrary abnormal Change processing, the forward direction distortion processing are at distortion identical with distortion direction caused by the eyeglass of the virtual reality device Reason.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor It is performed the steps of when row
During virtual reality device work, judge whether picture frame to be output in the virtual reality device needs It corrects;
When judgement described image frame needs timing, to the reversed distortion processing of described image frame progress;
When determining that described image frame do not need timing, distortion processing is not done to described image frame or is carried out at positive distortion Reason;
Wherein, the reversed distortion processing be with distort caused by the eyeglass of the virtual reality device it is contrary abnormal Change processing, the forward direction distortion processing are at distortion identical with distortion direction caused by the eyeglass of the virtual reality device Reason.
Image processing method and device, electronic equipment, computer readable storage medium in the present embodiment, in virtual reality During equipment works, judge whether picture frame to be output in virtual reality device needs to correct, when judgement described image Frame needs timing, carries out reversed distortion processing to picture frame, when determining that picture frame do not need timing, does not do to picture frame abnormal Become processing or carry out positive distortion processing, since reversed distortion processing is direction of distorting caused by eyeglass with virtual reality device Opposite distortion processing, positive distortion processing are at distortion identical with distortion direction caused by the eyeglass of virtual reality device Reason, in this way, the deformation of picture caused by optical lens is selectively corrected, so that picture preferably meets environmental demand, Enhance the feeling of immersion virtually with reality.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the flow chart of image processing method in one embodiment;
Fig. 2 is the effect schematic diagram of optical mirror slip in one embodiment;
Fig. 3 A is the schematic diagram of pattern distortion caused by optical mirror slip in one embodiment;
Fig. 3 B is the schematic diagram of pattern distortion caused by optical mirror slip in another embodiment;
Fig. 4 is the treatment effect schematic diagram that reversely distorts in one embodiment;
Fig. 5 is the handling principle schematic diagram that reversely distorts in one embodiment;
Fig. 6 is positive distortion treatment effect schematic diagram in one embodiment;
Fig. 7 is positive distortion handling principle schematic diagram in one embodiment;
Fig. 8 is the flow chart of image processing method in another embodiment;
Fig. 9 is the structural block diagram of image processing apparatus in one embodiment;
Figure 10 is the internal structure block diagram of electronic equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and It is not used in restriction the application.
Image processing method in the embodiment of the present application can be applied to electronic equipment, which can set for virtual reality It is standby etc..The electronic equipment carries out reversed distortion processing for the picture frame for needing to correct, not for the picture frame for not needing to correct It does distortion processing or carries out positive distortion processing, the deformation of picture caused by optical lens is selectively corrected, so that picture Preferably meet environmental demand, enhances the feeling of immersion virtually with reality.
Fig. 1 is the flow chart of image processing method in one embodiment.Image processing method shown in FIG. 1 can be applied to It states in electronic equipment, comprising:
Step 102, during virtual reality device works, judge image to be output in the virtual reality device Whether frame, which needs, corrects.
Wherein, virtual reality technology is a kind of computer simulation system that can be created with the experiencing virtual world, it is utilized Computer generates a kind of simulated environment, is immersed to user in the environment.Virtual reality device application virtual reality technology Hardware device, virtual reality device include display screen, and display screen is for exporting virtual reality image.
Since the pixel number and screen size of display screen are fixed, so that the field angle of user is limited.As shown in Fig. 2, Optical mirror slip is set close to the side of human eye in display screen, optical mirror slip is used to be promoted the field angle of user.But optical mirror slip The image into human eye can be made to be deformed, be known as distorting by this metaboly in the present embodiment.Such as Fig. 3 (A) and Fig. 3 (B) Shown, Fig. 3 (A) is barrel distortion caused by optical mirror slip, and Fig. 3 (B) is pincushion distortion caused by optical mirror slip.
Correction, which refers to, handles virtual reality image, so that being undeformed by the image that optical mirror slip enters human eye Image.As shown in figure 4, the image for entering human eye after correction is undeformed image by taking pincushion distortion as an example.
Specifically, in virtual reality image, the image after correction can bring good visual experience to user, but one In a little scenes, the image of distortion brings better visual experience instead, such as in some adventure and exploration game scenes, the figure of distortion As more interests can be brought.Therefore, picture frame can be selectively corrected, to improve the display of virtual reality device Effect.
During virtual reality device work, in picture frame before display screen output, judge whether picture frame needs It corrects.Judge that the mode for the correction whether picture frame needs may is that and judges picture frame to be output in virtual reality device Whether satisfaction presets correcting condition.Wherein, default correcting condition is preset condition, is preset when judgement picture frame meets this When correcting condition, determine that picture frame needs to correct;When determining that picture frame is unsatisfactory for the default correcting condition, picture frame is determined not It needs to correct.Default correcting condition can be set according to practical application, and the present invention is not specifically limited.
Step 104, when judgement described image frame needs timing, to the reversed distortion processing of described image frame progress.
Wherein, reversed distortion processing is the distortion processing for distorting contrary caused by the eyeglass with virtual reality device. Optical mirror slip makes the image into human eye generate distortion effect, in picture frame before display screen output, carries out to picture frame Reversed distortion processing, to offset the distortion effect of eyeglass generation.As shown in figure 4, reversed distortion processing is so that the image of deformation is extensive It is multiple normal.
Specifically, the mode for carrying out reversed distortion processing to described image frame may is that each pixel in correction picture frame The display parameters of point, wherein the display parameters of each pixel include the pixel value and seat of each pixel in described image frame Scale value.
Reversed distortion processing is related with the distance between pixel and central pixel point.It is reversed abnormal by taking pincushion distortion as an example Become the principle of processing are as follows: for pixel to be corrected, increase the distance between pixel and central pixel point, obtain pixel New coordinate value, the pixel value at the former coordinate of pixel is updated using the pixel value at new coordinate, is thereby realized anti- To distortion treatment effect.As shown in figure 5, Fig. 5 is single-point distortion correction schematic diagram in one embodiment.Square is correction model It encloses, open circles are the coordinate where pixel center point, and black triangle is the coordinate being reversed where the pixel of distortion processing, Hollow triangle is coordinate of the pixel where after reversely distortion processing at black triangle.Specifically, by pixel It is moved at hollow triangle by black triangle, assigns the pixel value at hollow triangle to the pixel at black triangle Value completes reversed distortion processing.
The distortion degree of picture depends on reversed distortion factor, reasonably selects reversed distortion factor that can make image Preferably offset the distortion effect that eyeglass generates.It is abnormal since light of the eyeglass for different wave length has different refractive index Change degree is also not exactly the same, and the eyeglass that reversed distortion factor can be used by virtual reality device determines.It is with liquid crystal display Example, liquid crystal display is that the LED light of many groups of red, blue, green three kinds of colors form, passes through the LED light of three kinds of colors of adjusting The pixel value of the bright pixel that just can secretly form different colours, therefore can be carried out respectively for the light wave of red, blue, green three kinds of colors Correction.
Step 106, when determine described image frame do not need timing, to described image frame do not doing distortion processing or carry out just It is handled to distortion.
In virtual reality image, in some scenes, the image of distortion brings better visual experience instead, such as In some adventure and exploration game scenes, the image of distortion can bring more interests.Therefore, when judgement picture frame does not need to correct When, it does not do distortion processing to picture frame or carries out positive distortion processing.
Wherein, positive distortion processing is that distortion identical with distortion direction caused by the eyeglass of virtual reality device is handled. Optical mirror slip makes the image into human eye generate distortion effect, in picture frame before display screen output, carries out to picture frame Positive distortion processing, to reinforce the distortion effect of eyeglass generation.As shown in fig. 6, positive distortion processing so that the image of deformation more Add distortion.
Specifically, the mode for carrying out positive distortion processing to described image frame may is that each pixel in change picture frame The display parameters of point, wherein the display parameters of each pixel include the pixel value and seat of each pixel in described image frame Scale value.
Similar with reversed distortion processing, forward direction distortion processing is related with the distance between pixel and central pixel point.With For pincushion distortion, the principle of forward direction distortion processing are as follows: for the pixel to positive distortion processing, reduce pixel and center The distance between pixel obtains the new coordinate value of pixel, updates the former of pixel using the pixel value at new coordinate and sits Pixel value at mark thereby realizes positive distortion treatment effect.As shown in fig. 7, Fig. 7 is single-point distortion in another embodiment Correct schematic diagram.Square is correcting range, and hollow ellipse is the coordinate where pixel center point, and solid diamond is by positive abnormal Become the coordinate where the pixel of processing, open diamonds place after positive distortion processing for the pixel at solid diamond Coordinate.Specifically, pixel is moved at open diamonds by solid diamond, the pixel value at open diamonds is assigned solid Pixel value at diamond shape completes positive distortion processing.
The distortion degree of picture depends on positive distortion factor, reasonably selects positive distortion factor that can make image Preferably offset the distortion effect that eyeglass generates.Positive distortion factor can be configured according to practical application, be thought with reaching user The visual effect wanted.
Image processing method in the present embodiment carries out reversed distortion processing for the picture frame for needing to correct, for not The picture frame for needing to correct does not do distortion processing or carries out positive distortion processing, selectively corrects caused by optical mirror slip Picture deformation enhances the feeling of immersion virtually with reality so that picture preferably meets environmental demand.
It is in one embodiment, described to judge whether picture frame to be output in the virtual reality device needs to correct, It include: to judge whether picture frame to be output in the virtual reality device meets default correcting condition;Wherein, described in the judgement When picture frame meets the default correcting condition, determine that described image frame needs to correct;When judgement described image frame is unsatisfactory for institute When stating default correcting condition, determine that described image frame does not need to correct.
Wherein, the condition that correcting condition is default settings is preset, when determining that picture frame meets the default correcting condition, is sentenced Determine picture frame to need to correct;When determining that picture frame is unsatisfactory for the default correcting condition, determine that picture frame does not need to correct.
Specifically, default correcting condition can be set according to practical application, and the present invention is not specifically limited.For example, In Before factory, the video frame that correct of needs can be identified, assign the video frame for needing to correct default mark, in picture frame from aobvious Before display screen output, detect whether the picture frame includes that default mark is corrected the video frame if including.For example, pre- First setting needs the type of video frame corrected, and the type can be the sound of the scene of element, video frame in video frame, video frame Whether pleasure, code/decode type of video frame etc. detect the picture frame and belong to and need to correct in picture frame before display screen output Type, if so, being corrected to the video frame.
It is appreciated that default not correcting condition also can be preset, wherein preset not calibration bars when determining that picture frame meets When part, determine that described image frame does not need to correct;When determining that picture frame is unsatisfactory for default not correcting condition, determine that picture frame needs It corrects.
Default not correcting condition can also be set according to practical application, and the present invention is not specifically limited.For example, dispatching from the factory Before, the video frame for not needing correction can be identified, assign the predetermined mark of video frame for not needing correction, in picture frame from aobvious Before display screen output, detects whether the picture frame includes predetermined mark, if including, distortion processing is not carried out to the video frame, Or carry out positive distortion processing.For example, presetting the type for not needing the video frame of correction, the type can be in video frame Element, the scene of video frame, the music of video frame, code/decode type of video frame etc., in picture frame before display screen output, It detects whether the picture frame belongs to the type for not needing correction, if so, not carrying out distortion processing to the video frame, or carries out just It is handled to distortion.
Image processing method in the present embodiment judges figure to be output in virtual reality device by default correcting condition As whether frame needs to correct, realization selectively corrects virtual reality image.
In one embodiment, described to judge whether picture frame to be output in the virtual reality device meets default school Positive condition, comprising: judge picture frame to be output in the virtual reality device whether include default mark, predicted elemental or Whether described image frame is at least one of default scene;Wherein, when described image frame include it is described it is default mark, it is described pre- If element or described image frame are at least one in the default scene, determine that described image frame meets the default school Positive condition.
Wherein, it presets mark and needs the picture frame that corrects for identify, default mark can be text, number, letter etc., originally Application is not specifically limited.Specifically, before factory, the video frame that can be corrected to needs is identified, and assigns what needs corrected The default mark of video frame detects whether the picture frame includes default mark in picture frame before display screen output, if including, Then the video frame is corrected.
Wherein, predicted elemental can be that preassigned element needs to be corrected if including the element in video frame. Predicted elemental can be default personage, default object, default text etc..For example predicted elemental is default personage, when in video frame When presetting personage including this, then the video frame is corrected.
Wherein, default scene refers to preassigned scene, if picture frame under the scene, needs to be corrected.It is default Scene can be the scene of terrified atmosphere, scene of dangerous atmosphere etc..For example default scene is the scene of terrified atmosphere, works as video The current scene of frame is the scene of terrified atmosphere, then is corrected to the video frame.
Image processing method in the present embodiment judges that virtual reality is set by default mark, predicted elemental, default scene Whether picture frame to be output needs to correct in standby, and realization selectively corrects virtual reality image, so that picture is more preferable Meet environmental demand, the virtual feeling of immersion with reality of enhancing.
In one embodiment, the judgement described image frame of working as needs timing, carries out to described image frame reversed abnormal Change processing, comprising: when determine described image frame need timing, obtain reversed distortion parameter and the institute of the virtual reality device State the display parameters of each pixel in picture frame;According to each pixel in the reversed distortion parameter and described image frame Display parameters determine the first object display parameters of each pixel in described image frame.
Wherein, in described image frame the display parameters of each pixel include each pixel pixel value and coordinate value, First object display parameters, which refer in described image frame, is reversed distortion by each pixel treated display parameters.
Wherein, reversed distortion parameter is used to determine the distortion degree of video frame.In polar coordinates system (r, θ), using such as Lower compensation process realizes distortion compensation: (r, θ) → (f (r) r, θ).Wherein, f (r)=k0+k1r2+k2r4+k3r6, r is pixel Point arrives the distance between central pixel point, k0、k1、k2、k3For reversed distortion factor, range is between 0 to 1.From above-mentioned expression formula In can obtain reversely distortion processing it is unrelated with θ, it is related with the distance between pixel and central pixel point.
By taking pincushion distortion as an example, the principle of reversed distortion processing are as follows: for pixel to be corrected, increase pixel in The distance between imago vegetarian refreshments obtains the new coordinate value of pixel, and the original of pixel is updated using the pixel value at new coordinate Pixel value at coordinate thereby realizes reversed distortion treatment effect.As shown in figure 5, Fig. 5 is that single-point is abnormal in one embodiment Become correction schematic diagram.Square is correcting range, and open circles are the coordinate where pixel center point, and black triangle is to be reversed Coordinate where the pixel of distortion processing, hollow triangle are the pixel at black triangle after reversely distortion processing The coordinate at place.Specifically, pixel is moved at hollow triangle by black triangle, by the picture at hollow triangle Element value assigns the pixel value at black triangle, that is, completes reversed distortion processing.
The distortion degree of picture depends on reversed distortion factor, reasonably selects reversed distortion factor that can make image Preferably offset the distortion effect that eyeglass generates.It is abnormal since light of the eyeglass for different wave length has different refractive index Change degree is also not exactly the same, and the eyeglass that reversed distortion factor can be used by virtual reality device determines.It is with liquid crystal display Example, liquid crystal display is that the LED light of many groups of red, blue, green three kinds of colors form, passes through the LED light of three kinds of colors of adjusting The pixel value of the bright pixel that just can secretly form different colours, therefore can be carried out respectively for the light wave of red, blue, green three kinds of colors Correction.
Image processing method in the present embodiment carries out reversed distortion processing for the picture frame for needing to correct, and guarantees empty The display effect of quasi- real world images.
In one embodiment, described when judgement described image frame does not need timing, to described image frame progress forward direction Distortion processing, comprising: when determine described image frame do not need timing, obtain the positive distortion parameter of the virtual reality device With the display parameters of pixel each in described image frame;According to each pixel in the positive distortion parameter and described image frame The display parameters of point determine the second target display parameters of each pixel in described image frame.
Wherein, in described image frame the display parameters of each pixel include each pixel pixel value and coordinate value, Second target display parameters refer in described image frame each pixel by forward direction distortion treated display parameters.
Wherein, positive distortion parameter is used to determine the distortion degree of video frame.In polar coordinates system (r, θ), using such as Lower compensation process realizes distortion compensation: (r, θ) → (f (r) r, θ).Wherein, f (r)=k4+k5r2+k6r4+k7r6, r is pixel Point arrives the distance between central pixel point, k4、k5、k6、k7For positive distortion factor, range is between 0 to 1.From above-mentioned expression formula In can to obtain positive distortion processing unrelated with θ, it is related with the distance between pixel and central pixel point.
By taking pincushion distortion as an example, the principle of forward direction distortion processing are as follows: for the pixel to positive distortion processing, reduce picture The distance between vegetarian refreshments and central pixel point obtain the new coordinate value of pixel, update picture using the pixel value at new coordinate Pixel value at the former coordinate of vegetarian refreshments thereby realizes positive distortion treatment effect.
The distortion degree of picture depends on positive distortion factor, reasonably selects positive distortion factor that can make image Preferably offset the distortion effect that eyeglass generates.Positive distortion factor can be configured according to practical application, be thought with reaching user The visual effect wanted.
Image processing method in the present embodiment carries out positive distortion processing, enhancing for the picture frame for not needing correction Virtually feel with the feeling of immersion of reality and substitution.
In one embodiment, in described image frame the display parameters of each pixel include each pixel pixel value And coordinate value;The display parameters according to each pixel in the positive distortion parameter and described image frame determine the figure As the second target display parameters of pixel each in frame, comprising: determined according to the positive distortion parameter and the coordinate value The coordinates of targets value of each pixel in described image frame is updated according to the target pixel value of pixel each in described image frame The pixel value obtains the second target display parameters of each pixel in described image frame.
Wherein, coordinates of targets value refers in described image frame each pixel by forward direction distortion treated coordinate value, mesh Mark pixel value refers in described image frame each pixel by forward direction distortion treated pixel value.
Specifically, as shown in fig. 7, Fig. 7 is single-point distortion correction schematic diagram in another embodiment.Square is correction model It enclosing, hollow ellipse is the coordinate where pixel center point, and solid diamond is the coordinate where the pixel handled by positive distortion, Open diamonds are coordinate of the pixel where after positive distortion processing at solid diamond.Specifically, by pixel by reality It is moved at open diamonds at heart diamond shape, assigns the pixel value at open diamonds to the pixel value at solid diamond, that is, complete just It is handled to distortion.
Image processing method in the present embodiment carries out positive distortion processing, enhancing for the picture frame for not needing correction Virtually feel with the feeling of immersion of reality and substitution.
In one embodiment, described to be determined in described image frame respectively according to the positive distortion parameter and the coordinate value The coordinates of targets value of a pixel, comprising: each pixel and institute in described image frame are determined according to the positive distortion parameter State the target range between the central pixel point of picture frame;Described image frame is determined according to the target range and the coordinate value In each pixel coordinates of targets value.
Wherein, target range refers to that each pixel is by the center after positive distortion processing with picture frame in described image frame The distance between pixel.
Positive distortion parameter is used to determine the distortion degree of video frame.In polar coordinates system (r, θ), following compensation is utilized Process realizes distortion compensation: (r, θ) → (f (r) r, θ).Wherein, f (r)=k4+k5r2+k6r4+k7r6, r is pixel in The distance between imago vegetarian refreshments, k4、k5、k6、k7For positive distortion factor, range is between 0 to 1.It can be obtained from above-mentioned expression formula Forward direction distortion processing is unrelated with θ, related with the distance between pixel and central pixel point.
By taking pincushion distortion as an example, the principle of forward direction distortion processing are as follows: for the pixel to positive distortion processing, reduce picture The distance between vegetarian refreshments and central pixel point obtain the coordinates of targets value of pixel, are updated using the pixel value at coordinates of targets Pixel value at the former coordinate of pixel thereby realizes positive distortion treatment effect.
Image processing method in the present embodiment carries out positive distortion processing, enhancing for the picture frame for not needing correction Virtually feel with the feeling of immersion of reality and substitution.
As shown in figure 8, being illustrated combined with specific embodiments below:
Step 802, during virtual reality device works, judge image to be output in the virtual reality device Whether frame includes whether predetermined mark, predetermined-element or described image frame are at least one of predetermined scene;
It step 804, is described when described image frame includes the predetermined mark, the predetermined-element or described image frame When at least one in predetermined scene, distortion processing is not done to described image frame or carries out positive distortion processing.
Wherein, making a reservation for mark for identify the picture frame for not needing correction, predetermined mark can be text, number, letter etc., The present invention is not specifically limited.Specifically, before factory, the video frame for not needing correction can be identified, imparting does not need The predetermined mark of the video frame of correction detects whether the picture frame includes predetermined mark in picture frame before display screen output, if Including not doing distortion processing to picture frame then or carrying out positive distortion processing.
Wherein, predetermined-element refers to preassigned element, if including the element in video frame, is not required to be corrected. Predetermined-element can be predetermined personage, predetermined object, predetermined text etc..For example predetermined-element is predetermined personage, when in video frame When including the predetermined personage, does not then do distortion processing to picture frame or carry out positive distortion processing.
Wherein, predetermined scene refers to preassigned scene, if picture frame under the scene, is not required to be corrected.In advance Determining scene can be the scene of terrified atmosphere, scene of dangerous atmosphere etc..For example predetermined scene is the scene of terrified atmosphere, works as view The current scene of frequency frame is the scene of terrified atmosphere, then does not do distortion processing to picture frame or carry out positive distortion processing.
Image processing method in the present embodiment does not do distortion processing for the picture frame for not needing correction or carries out positive Distortion processing selectively corrects the deformation of picture caused by optical lens, so that picture preferably meets environmental demand, increases The strong virtually feeling of immersion with reality.
It should be understood that although each step in the flow chart of Fig. 2 and Fig. 8 is successively shown according to the instruction of arrow, But these steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein, these There is no stringent sequences to limit for the execution of step, these steps can execute in other order.Moreover, in Fig. 2 and Fig. 8 At least part step may include that perhaps these sub-steps of multiple stages or stage are not necessarily same to multiple sub-steps One moment executed completion, but can execute at different times, and the execution in these sub-steps or stage sequence is also not necessarily Be successively carry out, but can at least part of the sub-step or stage of other steps or other steps in turn or Alternately execute.
Fig. 9 is the structural block diagram of image processing apparatus 900 in one embodiment.As shown in figure 9, a kind of image procossing dress It sets, including judgment module 902, reversed distortion module 904 and positive distortion module 906.Wherein:
Judgment module 902, for judging in the virtual reality device to defeated during virtual reality device work Whether picture frame out, which needs, corrects;
Reversed distortion module 904 carries out described image frame reversed abnormal for needing timing when judgement described image frame Change processing;
Forward direction distortion module 906 does not distort to described image frame for not needing timing when judgement described image frame Processing carries out positive distortion processing;
Wherein, the reversed distortion processing be with distort caused by the eyeglass of the virtual reality device it is contrary abnormal Change processing, the forward direction distortion processing are at distortion identical with distortion direction caused by the eyeglass of the virtual reality device Reason.
Image processing apparatus 900 in this implementation carries out reversed distortion processing for the picture frame for needing to correct, for not The picture frame for needing to correct does not do distortion processing or carries out positive distortion processing, selectively corrects caused by optical lens Picture deformation enhances the feeling of immersion virtually with reality so that picture preferably meets environmental demand.
In one embodiment, the judgment module 902 is also used to judge figure to be output in the virtual reality device As whether frame meets default correcting condition;Wherein, when determining that described image frame meets the default correcting condition, described in judgement Picture frame needs to correct;When determining that described image frame is unsatisfactory for the default correcting condition, determine that described image frame does not need Correction.
In one embodiment, the judgment module 902 is also used to judge figure to be output in the virtual reality device As whether frame includes whether default mark, predicted elemental or described image frame are at least one of default scene;Wherein, when Described image frame includes that the default mark, the predicted elemental or described image frame are at least one in the default scene When a, determine that described image frame meets the default correcting condition.
In one embodiment, the reversed distortion module 904 is also used to need timing when judgement described image frame, Obtain the display parameters of each pixel in the reversed distortion parameter and described image frame of the virtual reality device;According to described The display parameters of each pixel determine the of each pixel in described image frame in reversed distortion parameter and described image frame One target display parameters.
In one embodiment, the positive distortion module 906 is also used to not need to correct when judgement described image frame When, obtain the display parameters of each pixel in the positive distortion parameter and described image frame of the virtual reality device;According to The display parameters of each pixel determine each pixel in described image frame in the forward direction distortion parameter and described image frame The second target display parameters.
In one embodiment, the positive distortion module 906, is also used to according to the positive distortion parameter and the seat Scale value determines the coordinates of targets value of each pixel in described image frame, according to the target picture of pixel each in described image frame Element value updates the pixel value, obtains the second target display parameters of each pixel in described image frame.
In one embodiment, the positive distortion module 906 is also used to according to the positive distortion parameter determination Target range in picture frame between each pixel and the central pixel point of described image frame;According to the target range and institute State the coordinates of targets value that coordinate value determines each pixel in described image frame.
The division of modules is only used for for example, in other embodiments, can will scheme in above-mentioned image processing apparatus As processing unit is divided into different modules as required, to complete all or part of function of above-mentioned image processing apparatus.
Specific about image processing apparatus limits the restriction that may refer to above for image processing method, herein not It repeats again.Modules in above-mentioned image processing apparatus can be realized fully or partially through software, hardware and combinations thereof.On Stating each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also store in a software form In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
Figure 10 is the schematic diagram of internal structure of electronic equipment in one embodiment.As shown in Figure 10, which includes The processor and memory connected by system bus.Wherein, for the processor for providing calculating and control ability, support is entire The operation of electronic equipment.Memory may include non-volatile memory medium and built-in storage.Non-volatile memory medium is stored with Operating system and computer program.The computer program can be performed by processor, for realizing above each embodiment institute A kind of image processing method provided.Built-in storage provides height for the operating system computer program in non-volatile memory medium The running environment of speed caching.
Realizing for the modules in image processing apparatus provided in the embodiment of the present application can be the shape of computer program Formula.The computer program can be run in terminal or server.The program module that the computer program is constituted is storable in terminal Or on the memory of server.When the computer program is executed by processor, method described in the embodiment of the present application is realized Step.
The embodiment of the present application also provides a kind of computer readable storage mediums.One or more is executable comprising computer The non-volatile computer readable storage medium storing program for executing of instruction, when the computer executable instructions are executed by one or more processors When, so that the step of processor executes image processing method.
A kind of computer program product comprising instruction, when run on a computer, so that computer executes image Processing method.
Any reference to memory, storage, database or other media used in this application may include non-volatile And/or volatile memory.Nonvolatile memory may include that read-only memory (ROM), programming ROM (PROM), electricity can be compiled Journey ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include random access memory (RAM), it is used as external cache.By way of illustration and not limitation, RAM is available in many forms, such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) directly RAM (RDRAM), straight Connect memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM).
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of image processing method, which is characterized in that the described method includes:
During virtual reality device work, judge whether picture frame to be output in the virtual reality device needs school Just;
When judgement described image frame needs timing, to the reversed distortion processing of described image frame progress;
When determining that described image frame do not need timing, distortion processing is not done to described image frame or carries out positive distortion processing;
Wherein, the reversed distortion processing be at the contrary distortion that distorts caused by the eyeglass of the virtual reality device Reason, the forward direction distortion processing are that distortion identical with distortion direction caused by the eyeglass of the virtual reality device is handled.
2. the method according to claim 1, wherein figure to be output in the judgement virtual reality device As whether frame needs to correct, comprising:
Judge whether picture frame to be output in the virtual reality device meets default correcting condition;
Wherein, when determining that described image frame meets the default correcting condition, determine that described image frame needs to correct;Work as judgement When described image frame is unsatisfactory for the default correcting condition, determine that described image frame does not need to correct.
3. according to the method described in claim 2, it is characterized in that, figure to be output in the judgement virtual reality device As whether frame meets default correcting condition, comprising:
Judge whether picture frame to be output in the virtual reality device includes default mark, predicted elemental or described image Whether frame is at least one of default scene;
It wherein, is the default scene when described image frame includes the default mark, the predicted elemental or described image frame In at least one when, determine described image frame meet the default correcting condition.
4. the method according to claim 1, wherein the judgement described image frame of working as needs timing, to institute It states picture frame and carries out reversed distortion processing, comprising:
When determine described image frame need timing, obtain the reversed distortion parameter and described image frame of the virtual reality device In each pixel display parameters;
It is determined according to the display parameters of each pixel in the reversed distortion parameter and described image frame each in described image frame The first object display parameters of a pixel.
5. the method according to claim 1, wherein it is described when determine described image frame do not need timing, it is right Described image frame carries out positive distortion processing, comprising:
When determine described image frame do not need timing, obtain the positive distortion parameter and described image of the virtual reality device The display parameters of each pixel in frame;
It is determined according to the display parameters of each pixel in the positive distortion parameter and described image frame each in described image frame Second target display parameters of a pixel.
6. method according to claim 4 or 5, which is characterized in that the display parameters of each pixel in described image frame Pixel value and coordinate value including each pixel;It is described according to each pixel in the positive distortion parameter and described image frame The display parameters of point determine the second target display parameters of each pixel in described image frame, comprising:
The coordinates of targets value of each pixel in described image frame, root are determined according to the positive distortion parameter and the coordinate value The pixel value is updated according to the target pixel value of each pixel in described image frame, obtains each pixel in described image frame The second target display parameters.
7. according to the method described in claim 6, it is characterized in that, described according to the positive distortion parameter and the coordinate value Determine the coordinates of targets value of each pixel in described image frame, comprising:
According to the positive distortion parameter determine in described image frame the central pixel point of each pixel and described image frame it Between target range;
The coordinates of targets value of each pixel in described image frame is determined according to the target range and the coordinate value.
8. a kind of image processing apparatus, which is characterized in that described device includes:
Judgment module, for judging figure to be output in the virtual reality device during virtual reality device work As whether frame needs to correct;
Reversed distortion module carries out reversed distortion processing to described image frame for needing timing when judgement described image frame;
Forward direction distortion module, for when determine described image frame do not need timing, to described image frame do not do distortion processing or Carry out positive distortion processing;
Wherein, the reversed distortion processing be at the contrary distortion that distorts caused by the eyeglass of the virtual reality device Reason, the forward direction distortion processing are that distortion identical with distortion direction caused by the eyeglass of the virtual reality device is handled.
9. a kind of electronic equipment, the electronic equipment includes memory and processor, and computer journey is stored in the memory Sequence, when the computer program is executed by the processor, so that the processor executes such as any one of claims 1 to 7 The step of described method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method as described in any one of claims 1 to 7 is realized when being executed by processor.
CN201910726220.5A 2019-08-07 2019-08-07 Image processing method and device, electronic equipment and storage medium Active CN110490820B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910726220.5A CN110490820B (en) 2019-08-07 2019-08-07 Image processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910726220.5A CN110490820B (en) 2019-08-07 2019-08-07 Image processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110490820A true CN110490820A (en) 2019-11-22
CN110490820B CN110490820B (en) 2022-04-12

Family

ID=68550132

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910726220.5A Active CN110490820B (en) 2019-08-07 2019-08-07 Image processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110490820B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6339466B1 (en) * 1998-06-08 2002-01-15 Fuji Photo Film Co., Ltd. Image processing apparatus
US20130265383A1 (en) * 2012-04-09 2013-10-10 Tetsuo Yamashita Image processing apparatus, image processing method, and computer program product
CN103813088A (en) * 2012-11-13 2014-05-21 联想(北京)有限公司 Information processing method and electronic device
CN105005972A (en) * 2015-06-30 2015-10-28 广东欧珀移动通信有限公司 Shooting distance based distortion correction method and mobile terminal
CN105160632A (en) * 2015-06-30 2015-12-16 广东欧珀移动通信有限公司 Distortion correction method and mobile terminal
CN105793892A (en) * 2014-12-09 2016-07-20 深圳市大疆创新科技有限公司 Image processing method and apparatus and photographing device
CN107610044A (en) * 2017-08-29 2018-01-19 歌尔科技有限公司 Image processing method, computer-readable recording medium and virtual reality helmet
CN107888899A (en) * 2017-10-30 2018-04-06 杭州联络互动信息科技股份有限公司 For image acquiring method, device and virtual reality device in virtual reality device
CN108090880A (en) * 2017-12-29 2018-05-29 杭州联络互动信息科技股份有限公司 The anti-distortion processing method and device of a kind of image
CN109410140A (en) * 2018-10-24 2019-03-01 京东方科技集团股份有限公司 A kind of distortion correction method, device, system and computer readable storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6339466B1 (en) * 1998-06-08 2002-01-15 Fuji Photo Film Co., Ltd. Image processing apparatus
US20130265383A1 (en) * 2012-04-09 2013-10-10 Tetsuo Yamashita Image processing apparatus, image processing method, and computer program product
CN103813088A (en) * 2012-11-13 2014-05-21 联想(北京)有限公司 Information processing method and electronic device
CN105793892A (en) * 2014-12-09 2016-07-20 深圳市大疆创新科技有限公司 Image processing method and apparatus and photographing device
CN105005972A (en) * 2015-06-30 2015-10-28 广东欧珀移动通信有限公司 Shooting distance based distortion correction method and mobile terminal
CN105160632A (en) * 2015-06-30 2015-12-16 广东欧珀移动通信有限公司 Distortion correction method and mobile terminal
CN107610044A (en) * 2017-08-29 2018-01-19 歌尔科技有限公司 Image processing method, computer-readable recording medium and virtual reality helmet
CN107888899A (en) * 2017-10-30 2018-04-06 杭州联络互动信息科技股份有限公司 For image acquiring method, device and virtual reality device in virtual reality device
CN108090880A (en) * 2017-12-29 2018-05-29 杭州联络互动信息科技股份有限公司 The anti-distortion processing method and device of a kind of image
CN109410140A (en) * 2018-10-24 2019-03-01 京东方科技集团股份有限公司 A kind of distortion correction method, device, system and computer readable storage medium

Also Published As

Publication number Publication date
CN110490820B (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN109688392B (en) AR-HUD optical projection system, mapping relation calibration method and distortion correction method
CN110046546B (en) Adaptive sight tracking method, device and system and storage medium
US10403036B2 (en) Rendering glasses shadows
CN106919906B (en) Image interaction method and interaction device
JP2020510262A5 (en)
CN106502427A (en) Virtual reality system and its scene rendering method
CN106447785A (en) Method for driving virtual character and device thereof
US20220254089A1 (en) Shader auto-simplifying method and system based on rendering instruction flow
CN108090880A (en) The anti-distortion processing method and device of a kind of image
CN109696953B (en) Virtual reality character display method and device and virtual reality equipment
JPWO2019041902A5 (en)
WO2022089046A1 (en) Virtual reality display method and device, and storage medium
CN109255763A (en) Image processing method, device, equipment and storage medium
CN111652959B (en) Image processing method, near-to-eye display device, computer device, and storage medium
CN106657947A (en) Image generation method and photographing device
CN105808190A (en) Display screen display method and terminal equipment
US20100149319A1 (en) System for projecting three-dimensional images onto a two-dimensional screen and corresponding method
US20240202005A1 (en) Encoding stereo splash screen in static image
CN110490820A (en) Image processing method and device, electronic equipment, storage medium
CN109978804B (en) Human eye sight line correction method and system based on deep learning
CN115984519A (en) VR-based space scene display method, system and storage medium
CN113763281B (en) Gamma curve adjustment method and device
CN106485648A (en) Image acquisition device with correction function and correction method of image acquisition device
CN109410308A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN109101610A (en) For the car damage identification method of AR scene, device, equipment and storage medium

Legal Events

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