CN108777743B - Method for changing video color in real time based on gyroscope - Google Patents

Method for changing video color in real time based on gyroscope Download PDF

Info

Publication number
CN108777743B
CN108777743B CN201810505150.6A CN201810505150A CN108777743B CN 108777743 B CN108777743 B CN 108777743B CN 201810505150 A CN201810505150 A CN 201810505150A CN 108777743 B CN108777743 B CN 108777743B
Authority
CN
China
Prior art keywords
color
mobile phone
video
user
gyroscope
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810505150.6A
Other languages
Chinese (zh)
Other versions
CN108777743A (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.)
Liuzhou Zhishi Technology Co ltd
Original Assignee
Liuzhou Zhishi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Liuzhou Zhishi Technology Co ltd filed Critical Liuzhou Zhishi Technology Co ltd
Priority to CN201810505150.6A priority Critical patent/CN108777743B/en
Publication of CN108777743A publication Critical patent/CN108777743A/en
Application granted granted Critical
Publication of CN108777743B publication Critical patent/CN108777743B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/643Hue control means, e.g. flesh tone control

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Closed-Circuit Television Systems (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

A gyroscope-based method of changing video color in real time, the method comprising: opening a camera of the mobile phone, and clicking to shoot; shooting by a mobile phone, and acquiring real-time image information by a camera to acquire a current video sequence frame; the user selects any color in the video according to the shot video; detecting a region of a color selected by a user in a current video frame; moving or rotating the mobile phone, wherein a gyroscope arranged in the mobile phone also generates a rotation angle to obtain the angle change value; calculating a new color tone value according to the angle change value; changing the area of the selected color in the image to a new color; and outputting the video sequence frames with the changed colors to perform real-time video display. According to the invention, a mode of replacing gesture operation by the gyroscope is adopted, the color change effect is not required to be specified by the gesture, the color of the shot object can be changed in real time by monitoring the inclination or rotation amplitude of the mobile phone, great convenience is brought to the user, a brand new shooting experience is brought to the user, and the user experience is further improved.

Description

Method for changing video color in real time based on gyroscope
Technical Field
The invention relates to the technical field of video image processing, in particular to a method for changing video color in real time based on a gyroscope.
Background
In the current prior art, in the image capturing range, the color transformation of an object in a video image is required to be changed, the video image is only required to be processed in a later stage after being acquired, the color of the moving object which is shot cannot be transformed in real time during shooting, although the processing in the later stage can achieve the same effect, the hysteresis is too large, and the post-processing needs a large amount of manpower and material resources, while the technical requirement of the current internet market for the real-time color transformation of the moving object is more and more large, and the technology is urgently needed to meet the requirement of a user.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the method for changing the color of the video in real time based on the gyroscope is quick and convenient, does not need post-processing and can be used on various devices, so that the defects in the prior art are overcome.
The technical scheme adopted by the invention is as follows: a gyroscope-based method for changing video color in real time, comprising the steps of:
s1: opening a camera of the mobile phone, and clicking to shoot;
s2: shooting by a mobile phone, and acquiring real-time image information by a camera to acquire a current video sequence frame;
s3: the user selects any color in the video according to the shot video;
s4: detecting a region of a color selected by a user in a current video frame;
s5: moving or rotating the mobile phone, wherein a gyroscope arranged in the mobile phone also generates a rotation angle to obtain the angle change value;
s6: calculating a new color tone value according to the angle change value;
s7: changing the area of the selected color in the image to a new color;
s8: and outputting the video sequence frames with the changed colors to perform real-time video display.
The further technical scheme is as follows: the step S4 specifically includes the following steps:
s21: converting the color space of the current video frame from RGB into HSV;
s22: comparing the tone values H of all colors in the image with the tone values of the colors selected by the user on the basis of the tone values;
s23: the area of the color selected by the user in the current video frame is detected.
Further: the steps S6 to S7 specifically include the following steps:
s31: in the selected color region detected in step S4, based on the hue value Hn of each pixel in the HSV space, offset calculation is performed according to the angle change value in step S5 on the basis of the hue value Hn, to obtain a new hue value Hm of each pixel;
s32: changing the tone value Hn of each pixel point into a new tone value Hm;
s33: and finally, converting the color space of the current video frame into RGB by HSV.
Due to the adoption of the technical scheme, the method for changing the color of the video in real time based on the gyroscope has the following beneficial effects:
according to the method for changing the video color in real time based on the gyroscope, when a camera of a mobile phone shoots, the color appearing in the video is selected, the mobile phone is rotated or inclined, an angle deviation value generated in the rotation process of the mobile phone is calculated through a gyroscope sensor arranged in the mobile phone, and finally the selected color is changed according to the size of the deviation value.
The technical features of a method for changing video color in real time based on a gyroscope according to the present invention will be further described with reference to the following embodiments.
Drawings
None.
Abbreviations herein illustrate:
RGB: one method of representing color patterns, namely (Red, Green, Blue);
HSV: one method of representing a color mode is (Hue, Saturation, Value).
Detailed Description
Examples
A gyroscope-based method for changing video color in real time, comprising the steps of:
s1: opening a camera of the mobile phone, and clicking to shoot;
s2: shooting by a mobile phone, and acquiring real-time image information by a camera to acquire a current video sequence frame;
s3: the user selects any color in the video according to the shot video;
s4: detecting a region of a color selected by a user in a current video frame;
s5: moving or rotating the mobile phone, wherein a gyroscope arranged in the mobile phone also generates a rotation angle to obtain the angle change value;
s6: calculating a new color tone value according to the angle change value;
s7: changing the area of the selected color in the image to a new color;
s8: and outputting the video sequence frames with the changed colors to perform real-time video display.
The step S4 specifically includes the following steps:
s21: converting the color space of the current video frame from RGB into HSV;
s22: comparing the tone values H of all colors in the image with the tone values of the colors selected by the user on the basis of the tone values;
s23: the area of the color selected by the user in the current video frame is detected.
The steps S6 to S7 specifically include the following steps:
s31: in the selected color region detected in step S4, based on the hue value Hn of each pixel in the HSV space, offset calculation is performed according to the angle change value in step S5 on the basis of the hue value Hn, to obtain a new hue value Hm of each pixel;
s32: changing the tone value Hn of each pixel point into a new tone value Hm;
s33: and finally, converting the color space of the current video frame into RGB by HSV.
The above embodiments are only preferred embodiments of the present invention, and the structure of the present invention is not limited to the forms of the above embodiments, and any modifications, equivalents and the like within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (1)

1. A method for changing video color in real time based on a gyroscope is characterized in that: the method comprises the following steps:
s1: opening a camera of the mobile phone, and clicking to shoot;
s2: shooting by a mobile phone, and acquiring real-time image information by a camera to acquire a current video sequence frame;
s3: the user selects any color in the video according to the shot video;
s4: detecting a region of a color selected by a user in a current video frame;
s21: converting the color space of the current video frame from RGB into HSV;
s22: comparing the tone values H of all colors in the image with the tone values of the colors selected by the user on the basis of the tone values;
s23: detecting a region of a color selected by a user in a current video frame;
s5: moving or rotating the mobile phone, wherein a gyroscope arranged in the mobile phone also generates a rotation angle to obtain the angle change value;
s6: calculating a new color tone value according to the angle change value;
s7: changing the area of the selected color in the image to a new color;
s31: in the selected color region detected in step S4, based on the hue value Hn of each pixel in the HSV space, offset calculation is performed according to the angle change value in step S5 on the basis of the hue value Hn, to obtain a new hue value Hm of each pixel;
s32: changing the tone value Hn of each pixel point into a new tone value Hm;
s33: finally, converting the color space of the current video frame into RGB from HSV;
s8: and outputting the video sequence frames with the changed colors to perform real-time video display.
CN201810505150.6A 2018-05-24 2018-05-24 Method for changing video color in real time based on gyroscope Active CN108777743B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810505150.6A CN108777743B (en) 2018-05-24 2018-05-24 Method for changing video color in real time based on gyroscope

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810505150.6A CN108777743B (en) 2018-05-24 2018-05-24 Method for changing video color in real time based on gyroscope

Publications (2)

Publication Number Publication Date
CN108777743A CN108777743A (en) 2018-11-09
CN108777743B true CN108777743B (en) 2020-07-31

Family

ID=64027627

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810505150.6A Active CN108777743B (en) 2018-05-24 2018-05-24 Method for changing video color in real time based on gyroscope

Country Status (1)

Country Link
CN (1) CN108777743B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1677318A (en) * 2004-03-31 2005-10-05 日本电气株式会社 Portable device with action shortcut function
CN1926496A (en) * 2004-03-01 2007-03-07 苹果电脑有限公司 Methods and apparatuses for operating a portable device based on an accelerometer
CN102917158A (en) * 2012-09-07 2013-02-06 中兴通讯股份有限公司 Dynamic color replacing device and method as well as cellphone
KR20160051947A (en) * 2014-10-30 2016-05-12 삼성전자주식회사 Method for operating communication and electronic device supporting the same
CN105657937A (en) * 2015-12-30 2016-06-08 芜湖锐芯电子科技有限公司 Method for controlling illuminating device by means of smart phone sensor
JP2017079457A (en) * 2015-10-19 2017-04-27 このみ 一色 Portable information terminal, information processing apparatus, and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1926496A (en) * 2004-03-01 2007-03-07 苹果电脑有限公司 Methods and apparatuses for operating a portable device based on an accelerometer
CN1677318A (en) * 2004-03-31 2005-10-05 日本电气株式会社 Portable device with action shortcut function
CN102917158A (en) * 2012-09-07 2013-02-06 中兴通讯股份有限公司 Dynamic color replacing device and method as well as cellphone
KR20160051947A (en) * 2014-10-30 2016-05-12 삼성전자주식회사 Method for operating communication and electronic device supporting the same
JP2017079457A (en) * 2015-10-19 2017-04-27 このみ 一色 Portable information terminal, information processing apparatus, and program
CN105657937A (en) * 2015-12-30 2016-06-08 芜湖锐芯电子科技有限公司 Method for controlling illuminating device by means of smart phone sensor

Also Published As

Publication number Publication date
CN108777743A (en) 2018-11-09

Similar Documents

Publication Publication Date Title
CN103716547A (en) Smart mode photographing method
CN106600644B (en) Parameter correction method and device for panoramic camera
WO2018130177A1 (en) Image purple fringe eliminating system, method, computer-readable storage medium, and photographing device
CN108717691B (en) Image fusion method and device, electronic equipment and medium
US20090027521A1 (en) Image processing apparatus, image-taking system, image processing method and image processing program
JP2015211319A5 (en) Image processing apparatus, image processing method, and program
CN103986874A (en) Image acquiring device, method and terminal
US10154195B2 (en) Image joining apparatus, image pickup apparatus, image joining method, and image joining program
CN110930341A (en) Low-illumination image enhancement method based on image fusion
CN104853172B (en) A kind of information processing method and a kind of electronic equipment
CN107341767B (en) Image correction method and device
CN104618691A (en) Panoramic brightness balance regulating system and regulating method
CN105704398A (en) Video processing method
JP5352859B2 (en) Method and apparatus for maintaining video background using multiple Gaussian distribution models
JP2011095061A5 (en)
US10182184B2 (en) Image processing apparatus and image processing method
CN106550227A (en) A kind of image saturation method of adjustment and device
CN107818772A (en) Adaptive intra update frequency switching method
CN111107330A (en) Color cast correction method for Lab space
CN114331835A (en) Panoramic image splicing method and device based on optimal mapping matrix
CN107027017A (en) A kind of method of adjustment, device, picture processing chip and the storage device of image white balance
CN108777743B (en) Method for changing video color in real time based on gyroscope
JP2014220815A (en) Image color adjusting method and electronic device using the same
CN112738425A (en) Real-time video splicing system with multiple cameras for acquisition
CN109887027A (en) A kind of method for positioning mobile robot based on image

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
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 545616 No.233, building 3, factory building, area a, No.19 Chuyang Road, Liudong New District, Liuzhou City, Guangxi Zhuang Autonomous Region

Patentee after: LIUZHOU ZHISHI TECHNOLOGY Co.,Ltd.

Address before: 545006 5-12, building C, information industrial park, Gaoxin 1st Road, Chengzhong District, Liuzhou City, Guangxi Zhuang Autonomous Region

Patentee before: LIUZHOU ZHISHI TECHNOLOGY Co.,Ltd.