CN103049375B - A kind of camera on-line debugging method - Google Patents
A kind of camera on-line debugging method Download PDFInfo
- Publication number
- CN103049375B CN103049375B CN201210522254.0A CN201210522254A CN103049375B CN 103049375 B CN103049375 B CN 103049375B CN 201210522254 A CN201210522254 A CN 201210522254A CN 103049375 B CN103049375 B CN 103049375B
- Authority
- CN
- China
- Prior art keywords
- camera
- parameter
- mobile terminal
- driver
- amendment
- 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
Links
Landscapes
- Telephone Function (AREA)
- Stored Programmes (AREA)
- Studio Devices (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a kind of camera on-line debugging method, described camera is arranged at mobile terminal, said method comprising the steps of: in the camera bottom layer driving code of android mobile terminal, add DRIVER_ATTR attribute, creates Archive sit; PC is connected by USB line with mobile terminal, and switches mobile terminal to adb pattern, open mobile terminal camera, observation test camera image effect; Select manufacturer and the model of camera at PC end, insert the parameter of amendment; PC end calls adb program, the Archive sit created in step 1 by the parameter read-in mobile terminal after conversion by USB line, and mobile terminal performs the store function of DRIVER_ATTR attribute, by parameter read-in camera; Repeatedly contrast amendment, until promising result; Parameter is preserved.The present invention to camera carry out online real-time, hommization, debug efficiently, and effectively can improve the camera debugging efficiency of Android system, contribute to picking out best efficacy parameter.
Description
Technical field
The present invention relates to the camera on a kind of mobile terminal device, particularly relate to a kind of camera on-line debugging method.
Background technology
Current mobile device carrying out the main method of camera debugging is that manufacturer has debugged effect with specific purpose tool parameter is derived on demo plate, then these parameters are incorporated in the source code of software, recompilate out writable firmware and burning firmware again, start shooting again, when running camera application program, by mobile device master chip, parameter is write camera by I2C bus.Generally the parameter of camera manufacturer debugging takes effect that the real hardware platform needing to use obtains with demo plate has larger difference, this is caused by hardware differences (hardware processing platform, the glass mirror etc. that mobile device increases).Like this just must finely tune some parameters, traditional method is the parameter inside amendment code, and then recompilates out firmware, checking of again starting shooting after burning firmware.But this method needs recompility and burning firmware also again to start shooting, and its efficiency is extremely low; And a parameter can only be verified at every turn, be inconvenient to contrast, thus best efficacy parameter cannot be selected.
Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, a kind of camera on-line debugging method be provided, can to camera carry out online real-time, hommization, debug efficiently.
In order to achieve the above object, the technical solution used in the present invention is, a kind of camera on-line debugging method, and described camera is arranged at mobile terminal, comprises the following steps:
Step 1, in the camera bottom layer driving code of android mobile terminal, add DRIVER_ATTR attribute, the parameter read-in camera that the store function of this attribute will import into, when mobile terminal-opening carry webcam driver, in the probe function driven, call in the linux file system of driver_create_file function at Android system the Archive sit created the DRIVER_ATTR attribute realized;
Step 2, PC to be connected by USB line with mobile terminal, and to switch mobile terminal to adb pattern, open mobile terminal camera, observation test camera image effect;
Step 3, select the manufacturer of camera and model at PC end, insert the parameter of amendment, PC end becomes to meet to write the form of specification the Parameter Switch of input according to different manufacturers and model, be saved in historical record by the parameter inserted simultaneously;
Step 4, PC end calls adb program, the Archive sit created in step 1 by the parameter read-in mobile terminal after conversion by USB line, and mobile terminal performs the store function of DRIVER_ATTR attribute, by parameter read-in camera;
Whether step 5, observation test effect are satisfied with, dissatisfied then continue to select new parameter read-in at PC end, if this revises relative last change weak effect, then select parameter once in the historical record preserved in step 3, repeatedly contrast amendment, until promising result;
By selecting parameter to preserve after step 6, confirmation good results, PC preserves into file, and the parameter taking-up in this file is merged into mobile terminal.
Further, described camera tuning parameter comprises many group camera parameters, and is selected the parameter of access camera by setting options.
Further, described step 5 specifically comprises:
Step S501. calls amendment camera parametric function;
Step S502. modifies to camera parameter;
Step S503. tests amended camera parameter, obtains debug results;
The customer satisfaction system test result that obtains step S504. then terminates debugging, otherwise continues amendment camera parameter or return last parameter.
Further, described promising result is user's visual effect, is then promising result when reaching user's Expected Results.
Further, described amendment camera parameter is part amendment.
Further, described mobile terminal comprises mobile phone, computer, camera.
Compared with prior art, the invention has the beneficial effects as follows: to camera carry out online real-time, hommization, debug efficiently, and can effectively improve camera debugging efficiency, contribute to picking out best efficacy parameter.
Accompanying drawing explanation
Fig. 1 is method flow diagram of the present invention.
Embodiment
Be described in detail, to be interpretated more in-depth technical characteristic of the present invention and advantage with reference to accompanying drawing below in conjunction with embodiment.
The sysfs attribute function of Linux provides the user interface operated the attribute of equipment, and a virtual file can be created for user operation, such as write or read operation is carried out to the virtual file of device drives DRIVER_ATTR, just can revise or read the corresponding information of driving.Respective function can be called, store or show: the property file that user writes driving will call the store function of driving, and user's reading attributes file will call the show function of driving when in fact the DRIVER_ATTR property file driven being operated.Therefore we the function of invocation facility and camera communication inside store function can revise camera parameter, thus reach the object of debugging.And in debugging end (mainly PC) by USB line connection device, the adb instrument provided by Google is entered shell and operates property file recited above.Be equipped with the graphical interfaces of hommization and the parameter format compatible program of each camera simultaneously, at utmost improve debugging efficiency.
Method flow diagram of the present invention as shown in Figure 1, a kind of camera on-line debugging method, described camera is arranged at mobile terminal, comprises the following steps:
Step 1, in the camera bottom layer driving code of android mobile terminal, add DRIVER_ATTR attribute, the parameter read-in camera that the store function of this attribute will import into, when mobile terminal-opening carry webcam driver, the Archive sit (after have invoked this function (taking DRIVER_ATTR as function parameter), corresponding Archive sit will be there is in system) created the DRIVER_ATTR attribute realized is called in the linux file system of driver_create_file function at Android system in the probe function driven; Wherein DRIVER_ATTR is that of linux kernel is grand, for defining an attribute structure body driven; Store is the member driving attribute structure body, for driving write parameters; Probe is the structure member that Linux drives, and finds the function that can call this member sensing during relevant device when General System starts in systems in which;
Driver_create_file function is used in the Virtual File System of Linux, creating one in kernel with driving relevant Archive sit, can call the function specified by parameter of this function when accessing this file; The full name of adb is Android Debug Bridge, a debugging acid on Android, all available on Windows, Linux, Mac OS X, uses this instrument can access android system equipment;
Step 2, PC to be connected by USB line with mobile terminal, and to switch mobile terminal to adb pattern, open mobile terminal camera, observation test camera image effect;
Step 3, select the manufacturer of camera and model at PC end, insert the parameter of amendment, PC end becomes to meet to write the form of specification the Parameter Switch of input according to different manufacturers and model, be saved in historical record by the parameter inserted simultaneously;
Step 4, PC end calls adb program, the Archive sit created in step 1 by the parameter read-in mobile terminal after conversion by USB line, and mobile terminal performs the store function of DRIVER_ATTR attribute, by parameter read-in camera;
Whether step 5, observation test effect are satisfied with, dissatisfied then continue to select new parameter read-in at PC end, if this revises relative last change weak effect, then select parameter once in the historical record preserved in step 3, repeatedly contrast amendment, until promising result;
By selecting parameter to preserve after step 6, confirmation good results, PC preserves into file, and the parameter taking-up in this file is merged into mobile terminal.
Further, described camera tuning parameter comprises many group camera parameters, and is selected the parameter of access camera by setting options.
Further, described step 5 specifically comprises:
Step S501. calls amendment camera parametric function;
Step S502. modifies to camera parameter;
Step S503. tests amended camera parameter, obtains debug results;
The customer satisfaction system test result that obtains step S504. then terminates debugging, otherwise continues amendment camera parameter or return last parameter.
Further, described promising result is user's visual effect, is then promising result when reaching user's Expected Results.Effect herein, without unified standard, is user's naked-eye observation.
Further, described amendment camera parameter is part amendment, and part is revised as fine setting.
Further, described mobile terminal comprises mobile phone, computer, camera.
The DRIVER_ATTR attribute that an amendment drives is defined inside webcam driver code file, as: static DRIVER_ATTR (camera_debug, 0664, para_show, para_store); Then in the probe function of driver, camera_debug attribute is imported into create property file by the driver_create_file function of Linux.Para_show function may be used for the purposes such as the correctness of inspection parameter, wouldn't relate to.In para_store function, convert the supplemental characteristic of the set form imported into digital array, then the communication program of invocation facility and camera is by parameter read-in camera;
Parameter read-in can come into force, thus changes the effect of camera, can observe new effect at once, and can return last parameter, repeatedly contrasting, drawing best effect when being unsatisfied with current effect by amendment relevant parameter.At PC end, final argument is derived, to be disposablely incorporated in firmware.
This method is not need PC to hold specially Linux system is housed, and windows, linux, Mac OS etc. can be used by the PC end that android adb supports; PC end does not need the parameter reading current camera, because understand oneself when mobile phone enters camera to read the parameter read-in camera originally had, the parameter just regulated by needs that this method needs is by the write of PC end; The final argument obtained is not saved in mobile terminal by this method, but is kept at PC end;
Camera manufacturer debug to effect much the same parameter to us, we are gone the parameter that camera manufacturer gives according to being incorporated into inside code by the form of mobile terminal cpu write camera, then we understand compiled code and generate a firmware, be burnt to inside mobile terminal, open camera by calling camera application program after mobile terminal-opening, in this process, mobile phone cpu will by parameter read-in to camera.If see that effect is unsatisfied with, just need to debug: traditional amending method is that we just have to remodify relevant parameter inside code, and then recompilates generation firmware, is burnt in mobile terminal, starts shooting and again verify, again and again.Compiling, burning, start etc. are all processes consuming time.
And amending method of the present invention only needs, by USB line, mobile terminal is connected to computer, directly the corresponding parameter of amendment just can make the parameter on mobile terminal change on computers, thus immediately can see the effect after parameter change, immediately parameter is revised, until find out suitable parameter after dissatisfied.
Invention has been following improvement:
A.PC is with the connection of computer.This method uses the adb of android to connect, and PC can access the file system of mobile terminal by adb, just parameter can be passed to mobile terminal by the file write in the file system of mobile terminal.
The parameter of b.PC end amendment finally needs to be written to camera and just can come into force.This method realizes the DRIVER_ATTR attribute in a linux in mobile terminal underlying programs, corresponding property file will be created like this in mobile terminal Virtual File System, and the RIVER_ATTR attribute of this method contains the operation parameter importing file system into being write into camera in realizing, that is PC writes parameter inside the property file in mobile terminal document system by adb, and parameter will be write in camera and go by mobile terminal system.
C. need to defer to certain specification from PC to the parameter of mobile terminal and just can be written to camera, and the form of the camera write parameters of different vendor is also different.The format conversion of input by selecting manufacturer's model at PC end, is become to meet the form of write camera specification, then is write in mobile terminal by adb by this method at PC end.
D. after debugging promising result, parameter preserves problem.Effect due to this method is finely tuned camera effect, so the last parameter only needing an amendment part, if need to relate to the problem of replacing original parameter so result parameter is saved in mobile terminal, in realization, difficulty is larger, so do not intend to be saved in mobile terminal, this method adopts can by being saved in last parameter in PC file at PC end, be incorporated in code like this by the craft of the parameter of preservation, this large increase efficiency.
E. different vendor's parameter read-in method form may be different.Such as some camera needs first to write certain mark to camera before a certain parameter of amendment, certain mark also will be write to make parameter come into force after writing parameter, this method selects manufacturer's model, automatically to convert the form met at PC end by setting options.
Above content is in conjunction with concrete optimal way further description made for the present invention, should not assert that specific embodiment of the invention is confined to above explanation.For those skilled in the art, without departing from the inventive concept of the premise, some simple deduction or replace can also be made, within the protection domain that the claim that all should be considered as being submitted to by the present invention is determined.
Claims (5)
1. a camera on-line debugging method, described camera is arranged at mobile terminal, comprises the following steps:
Step 1, in the camera bottom layer driving code of android mobile terminal, add DRIVER_ATTR attribute, the parameter read-in camera that the store function of this attribute will import into, when mobile terminal-opening carry webcam driver, in the probe function driven, call in the linux file system of driver_create_file function at Android system the Archive sit created the DRIVER_ATTR attribute realized;
Step 2, PC to be connected by USB line with mobile terminal, and to switch mobile terminal to adb pattern, open mobile terminal camera, observation test camera image effect;
Step 3, select the manufacturer of camera and model at PC end, insert the parameter of amendment, PC end becomes to meet to write the form of specification the Parameter Switch of input according to different manufacturers and model, be saved in historical record by the parameter inserted simultaneously;
Step 4, PC end calls adb program, the Archive sit created in step 1 by the parameter read-in mobile terminal after conversion by USB line, and mobile terminal performs the store function of DRIVER_ATTR attribute, by parameter read-in camera;
Whether step 5, observation test effect are satisfied with, dissatisfied then continue to select new parameter read-in at PC end, if this revises relative last change weak effect, then select parameter once in the historical record preserved in step 3, repeatedly contrast amendment, until promising result;
By selecting parameter to preserve after step 6, confirmation good results, PC preserves into file, and the parameter taking-up in this file is merged into mobile terminal;
Wherein DRIVER_ATTR is that of linux kernel is grand, for defining an attribute structure body driven; Store is the member driving attribute structure body, for driving write parameters; Probe is the structure member that Linux drives, and finds the function that can call this member sensing during relevant device when General System starts in systems in which; Driver_create_file function is used in the Virtual File System of Linux, creating one in kernel with driving relevant Archive sit, can call the function specified by parameter of this function when accessing this file;
Described step 5 specifically comprises:
Step S501. calls amendment camera parametric function;
Step S502. modifies to camera parameter;
Step S503. tests amended camera parameter, obtains debug results;
The customer satisfaction system test result that obtains step S504. then terminates debugging, otherwise continues amendment camera parameter or return last parameter.
2. camera on-line debugging method according to claim 1, is characterized in that: described parameter comprises many group camera parameters, and is selected the parameter of access camera by setting options.
3. camera on-line debugging method according to claim 2, is characterized in that: described promising result is user's visual effect, is then promising result when reaching user's Expected Results.
4. camera on-line debugging method according to claim 3, is characterized in that: described amendment camera parameter is part amendment.
5. the camera on-line debugging method according to any one of claim 1-4, is characterized in that: described mobile terminal comprises mobile phone, computer, camera.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210522254.0A CN103049375B (en) | 2012-12-07 | 2012-12-07 | A kind of camera on-line debugging method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210522254.0A CN103049375B (en) | 2012-12-07 | 2012-12-07 | A kind of camera on-line debugging method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103049375A CN103049375A (en) | 2013-04-17 |
CN103049375B true CN103049375B (en) | 2015-09-30 |
Family
ID=48062022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210522254.0A Active CN103049375B (en) | 2012-12-07 | 2012-12-07 | A kind of camera on-line debugging method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103049375B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107295250A (en) * | 2017-06-09 | 2017-10-24 | 福州汇思博信息技术有限公司 | Camera adjustment method and its system |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103269291B (en) * | 2013-04-19 | 2016-02-24 | 福州瑞芯微电子股份有限公司 | Android platform utilize point-to-point radio-frequency apparatus carry out the method for ADB debugging |
CN103269293B (en) * | 2013-04-19 | 2015-10-14 | 福州瑞芯微电子有限公司 | Android platform utilize microwave telecommunication devices carry out the method for debugging acid ADB debugging |
CN106027781A (en) * | 2016-05-17 | 2016-10-12 | 乐视控股(北京)有限公司 | Dynamic parameter regulation system and method |
CN106131276A (en) * | 2016-06-17 | 2016-11-16 | 刘华英 | Parameter edit methods based on mobile terminal and system |
CN106598847A (en) * | 2016-11-30 | 2017-04-26 | 惠州华阳通用电子有限公司 | Software off-line dynamic debugging method and device |
CN106897045B (en) * | 2017-02-28 | 2019-08-16 | Oppo广东移动通信有限公司 | Audio frequency playing method, device and computer equipment |
CN107707905A (en) * | 2017-09-26 | 2018-02-16 | 惠州市德赛西威汽车电子股份有限公司 | A kind of multi-cam tests display system |
CN112312118A (en) * | 2019-07-29 | 2021-02-02 | 中兴通讯股份有限公司 | Camera maintenance equipment, method and device and storage medium |
CN111049912A (en) * | 2019-12-17 | 2020-04-21 | 用友网络科技股份有限公司 | Debugging method, test development device, and computer-readable storage medium |
CN111240965A (en) * | 2020-01-03 | 2020-06-05 | 珠海亿智电子科技有限公司 | ISP real-time debugging method and system |
CN111736870A (en) * | 2020-06-19 | 2020-10-02 | 东莞市李群自动化技术有限公司 | Industrial camera adaptation method and device, electronic equipment and storage medium |
CN112073711B (en) * | 2020-08-25 | 2022-03-04 | 上海龙旗科技股份有限公司 | Method, system and equipment for simulating and debugging camera performance parameters of intelligent equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101577756A (en) * | 2009-03-05 | 2009-11-11 | 上海闻泰电子科技有限公司 | Method for debugging image display unit in mobile phone platform through PC |
CN102075632A (en) * | 2011-01-26 | 2011-05-25 | 青岛海信移动通信技术股份有限公司 | Mobile terminal camera debugging method and device |
CN102355592A (en) * | 2011-09-22 | 2012-02-15 | 中兴通讯股份有限公司 | Method for detecting camera of mobile terminal and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5091999B2 (en) * | 2010-09-24 | 2012-12-05 | シャープ株式会社 | Semiconductor memory device |
-
2012
- 2012-12-07 CN CN201210522254.0A patent/CN103049375B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101577756A (en) * | 2009-03-05 | 2009-11-11 | 上海闻泰电子科技有限公司 | Method for debugging image display unit in mobile phone platform through PC |
CN102075632A (en) * | 2011-01-26 | 2011-05-25 | 青岛海信移动通信技术股份有限公司 | Mobile terminal camera debugging method and device |
CN102355592A (en) * | 2011-09-22 | 2012-02-15 | 中兴通讯股份有限公司 | Method for detecting camera of mobile terminal and system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107295250A (en) * | 2017-06-09 | 2017-10-24 | 福州汇思博信息技术有限公司 | Camera adjustment method and its system |
CN107295250B (en) * | 2017-06-09 | 2019-10-01 | 福州汇思博信息技术有限公司 | Camera adjustment method and its system |
Also Published As
Publication number | Publication date |
---|---|
CN103049375A (en) | 2013-04-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103049375B (en) | A kind of camera on-line debugging method | |
EP2368189B1 (en) | Debugging pipeline | |
EP2359247B1 (en) | Transforming user script code for debugging | |
Gottschalk et al. | Removing energy code smells with reengineering services | |
US8752020B2 (en) | System and process for debugging object-oriented programming code leveraging runtime metadata | |
US20090172664A1 (en) | Adding a profiling agent to a virtual machine to permit performance and memory consumption analysis within unit tests | |
US20150186161A1 (en) | Platform system, method for changing support hardware configuration of universal extensible firmware interface basic input output system and computer program product | |
US9262299B1 (en) | Simulation observability and control of all hardware and software components of a virtual platform model of an electronics system | |
CN108459962A (en) | Code specification detection method, device, terminal device and storage medium | |
CN103123605B (en) | A kind of Android platform automatic integration test method and device | |
CN105138463A (en) | Testing method and system for mobile terminal software | |
CN111177113A (en) | Data migration method and device, computer equipment and storage medium | |
CN117149209A (en) | Code increment compiling method and device, computer equipment and storage medium | |
CN111385661B (en) | Method, device, terminal and storage medium for voice control of full screen playing | |
CN109582318B (en) | Processing method and device for Portobuf localization, terminal and storage medium | |
CN106294143B (en) | Debugging method and device for chip register | |
CN102750167B (en) | Application program launching method, device and computer system | |
CN111949510B (en) | Test processing method, device, electronic equipment and readable storage medium | |
CN110851313B (en) | Sensor debugging method, intelligent terminal, storage medium and electronic equipment | |
CN114218261A (en) | Data query method and device, storage medium and electronic equipment | |
CN110727677B (en) | Method and device for tracing blood relationship of table in data warehouse | |
US10339229B1 (en) | Simulation observability and control of all hardware and software components of a virtual platform model of an electronics system | |
EP3734491A1 (en) | Method, apparatus, device, and medium for implementing simulator | |
US8914274B1 (en) | Method and system for instruction set simulation with concurrent attachment of multiple debuggers | |
CN114443375A (en) | Test method and device, electronic device and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd. |
|
CP01 | Change in the name or title of a patent holder |