CN109858303A - A kind of scan method and terminal device - Google Patents

A kind of scan method and terminal device Download PDF

Info

Publication number
CN109858303A
CN109858303A CN201811557207.3A CN201811557207A CN109858303A CN 109858303 A CN109858303 A CN 109858303A CN 201811557207 A CN201811557207 A CN 201811557207A CN 109858303 A CN109858303 A CN 109858303A
Authority
CN
China
Prior art keywords
area
terminal device
voxel model
sweep object
ratio
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
CN201811557207.3A
Other languages
Chinese (zh)
Other versions
CN109858303B (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201811557207.3A priority Critical patent/CN109858303B/en
Publication of CN109858303A publication Critical patent/CN109858303A/en
Application granted granted Critical
Publication of CN109858303B publication Critical patent/CN109858303B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the present invention provides a kind of scan method and terminal device, is related to field of terminal technology, inflexible in a manner of solving the problems, such as adjustment terminal device power consumption.This method comprises: obtaining area ratio of the sweep object in preview pane under preview mode, the area ratio is the ratio of the first area and second area, first area is sweep object area shared in preview pane, which is the ratio of the area of the preview pane;According to the area ratio, the first voxel model corresponding with the area ratio is determined;The sweep object is scanned with first voxel model.

Description

A kind of scan method and terminal device
Technical field
The present embodiments relate to field of terminal technology more particularly to a kind of scan method and terminal devices.
Background technique
With the development of terminal technology, the frequency that user's using terminal equipment scans the two-dimensional code is higher and higher.
In general, user can be scanned under preview mode by the camera of terminal device and identify two dimensional code.Wherein, if User does not change the pixel of camera, then it (can be default that it is fixed that camera scans used pixel every time Pixel, or the pixel of user's selection).Camera is using high pixel or low pixel energy successful scan two dimensional code and identifies The information of two dimensional code instruction.
However, since camera uses power consumption of the power consumption of high picture element scan higher than camera using low pixel scanning, because This, when camera short range scanning two dimensional code, if camera uses high picture element scan, will lead to the power consumption of camera compared with It is high;When camera long-range scanning two dimensional code, if camera uses too low picture element scan, camera acquisition information will lead to Failure;If user wants adjustment, user needs to manually adjust the voxel model of camera, so as to cause adjustment terminal device function The mode of consumption is inflexible.
Summary of the invention
The embodiment of the present invention provides a kind of scan method and terminal device, in a manner of solving to adjust terminal device power consumption not Enough flexible problems.
In order to solve the above-mentioned technical problem, the embodiments of the present invention are implemented as follows:
In a first aspect, the embodiment of the present invention provides a kind of scan method, sweep object is obtained under preview mode in preview Area ratio in frame, the area ratio are the ratio of the first area and second area, which is the sweep object in preview Shared area in frame, the second area are the area of the preview pane;According to the area ratio, corresponding with the area ratio the is determined One voxel model;The sweep object is scanned with first voxel model.
Second aspect, the embodiment of the invention also provides a kind of terminal device, which includes obtaining module, determination Module and scan module;The acquisition module should for obtaining area ratio of the sweep object in preview pane under previewing module formula Area ratio is the ratio of the first area and second area, which is sweep object area shared in preview pane, should Second area is the area of the preview pane;The determining module, the area ratio for being obtained according to the acquisition module are determined and are somebody's turn to do Corresponding first voxel model of area ratio;The scan module, first voxel model scanning for being determined with the determining module The sweep object.
The third aspect the embodiment of the invention provides a kind of terminal device, including processor, memory and is stored in this and deposits On reservoir and the computer program that can run on the processor, such as first is realized when which is executed by the processor The step of scan method described in aspect.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage medium, the computer-readable storage mediums Computer program is stored in matter, and the step of scan method as described in relation to the first aspect is realized when which is executed by processor Suddenly.
In embodiments of the present invention, terminal device obtains area of the sweep object in preview pane first under preview mode Than then terminal device determines that the corresponding voxel model of the area ratio is the first voxel model, finally according to the area ratio Terminal device scans sweep object according to first voxel model.Wherein, which is the ratio of the first area and second area Value, the first area are sweep object area shared in preview pane, and second area is the area of preview pane.Due to terminal device It is according to the voxel model of above-mentioned area ratio selection scanning, for the same sweep object, the sweep object is apart from terminal device When closer, area of the sweep object in preview pane is bigger, and terminal device can select this biggish when area is bigger The corresponding voxel model of area ratio, when the sweep object apart from terminal device farther out when, face of the sweep object in preview pane Product is smaller, and the corresponding voxel model of the lesser area ratio can also be selected when area is smaller, is manually adjusted without user, Therefore, compared to existing by the way of fixed power consumption scanning, scan method provided in an embodiment of the present invention can be adjusted neatly The power consumption for saving terminal device, can not only reduce terminal device in the power consumption of one sweep object of short range scanning, can also mention Accuracy of the high terminal device in one sweep object of long-range scanning.
Detailed description of the invention
Fig. 1 is a kind of configuration diagram of possible Android operation system provided in an embodiment of the present invention;
Fig. 2 is a kind of flow diagram of scan method provided in an embodiment of the present invention;
Fig. 3 is a kind of scanning interface schematic diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of switch logic schematic diagram of voxel model provided in an embodiment of the present invention;
Fig. 5 is a kind of possible structural schematic diagram of terminal device provided in an embodiment of the present invention;
Fig. 6 is the possible structural schematic diagram of another terminal device provided in an embodiment of the present invention;
Fig. 7 is the possible structural schematic diagram of another terminal device provided in an embodiment of the present invention;
Fig. 8 is a kind of hardware structural diagram of terminal device of each embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be noted that "/" herein indicate or the meaning, for example, A/B can indicate A or B;Herein "and/or" is only a kind of incidence relation for describing affiliated partner, indicates may exist three kinds of relationships, for example, A and/or B, it can To indicate: individualism A exists simultaneously A and B, these three situations of individualism B." multiple " refer to two or more.
Term " first " and " second " in description and claims of this specification etc. are for distinguishing different pairs As, rather than it is used for the particular order of description object.For example, the first area and second area etc. are for distinguishing different faces Product, rather than the particular order for describing area.
It should be noted that in the embodiment of the present invention, " illustrative " or " such as " etc. words make example, example for indicating Card or explanation.Be described as in the embodiment of the present invention " illustrative " or " such as " any embodiment or design scheme do not answer It is interpreted than other embodiments or design scheme more preferably or more advantage.Specifically, " illustrative " or " example are used Such as " word is intended to that related notion is presented in specific ways.
Terminal device in the embodiment of the present invention can be the terminal device with operating system.The operating system can be Android (Android) operating system can be ios operating system, can also be other possible operating systems, and the present invention is implemented Example is not especially limited.
Below by taking Android operation system as an example, software applied by scan method provided in an embodiment of the present invention is introduced Environment.
As shown in Figure 1, being a kind of configuration diagram of possible Android operation system provided in an embodiment of the present invention.Scheming In 1, the framework of Android operation system includes 4 layers, be respectively as follows: application layer, application framework layer, system Runtime Library layer and Inner nuclear layer (is specifically as follows Linux inner core).
Wherein, application layer includes each application program (including system application and in Android operation system Tripartite's application program).
Application framework layer is the frame of application program, and developer can be in the exploitation for the frame for abiding by application program In the case where principle, some application programs are developed based on application framework layer.
System Runtime Library layer includes library (also referred to as system library) and Android operation system running environment.Library is mainly Android behaviour As system it is provided needed for all kinds of resources.Android operation system running environment is used to provide software loop for Android operation system Border.
Inner nuclear layer is the operating system layer of Android operation system, belongs to the bottom of Android operation system software level.It is interior Stratum nucleare provides core system service and hardware-related driver based on linux kernel for Android operation system.
By taking Android operation system as an example, in the embodiment of the present invention, developer can be based on above-mentioned Android as shown in Figure 1 The system architecture of operating system, the software program of scan method provided in an embodiment of the present invention is realized in exploitation, so that this is swept The method of retouching can be run based on Android operation system as shown in Figure 1.I.e. processor or terminal device equipment can by The software program is run in Android operation system realizes scan method provided in an embodiment of the present invention.
The scan method of the embodiment of the present invention is illustrated below with reference in Fig. 2.Fig. 2 is provided in an embodiment of the present invention A kind of flow diagram of scan method, as shown in Fig. 2, the scan method includes S201-S203:
S201, terminal device obtain area ratio of the sweep object in preview pane under preview mode.
Wherein, which is the ratio of the first area and second area, and the first area is sweep object in preview pane Shared area, second area are the area of preview pane.
It is appreciated that distance of the sweep object apart from terminal device is bigger, the sweep object for the same sweep object Area in preview pane is smaller, and distance of the sweep object apart from terminal device is smaller, and the sweep object is in the same preview Area in frame is bigger.
It should be noted that preview pane is the scanning area shown on terminal device interface.
Optionally, sweep object may include bar code, two dimensional code, article (for example, what one article of scanning recognition is Article) etc., wherein in the embodiment of the present invention, the shape of two dimensional code can be rectangle, or other irregular shapes, this Inventive embodiments are not especially limited this.
It should be noted that the shape of preview pane in the different application of terminal device can be identical or not identical, The area of preview pane in different application also may be the same or different, and terminal device uses the scanning function in which application The area of the barcode scanning frame of the application is then used when energy, the present invention is not especially limit this.
S202, terminal device determine the first voxel model corresponding with the area ratio according to the area ratio.
It optionally, may include a variety of voxel models in terminal device, the corresponding power consumption of each voxel model is different, The corresponding pixel of the one voxel model more corresponding power consumption of more then voxel models is higher.
The ratio for the area that above-mentioned sweep object accounts in preview pane is bigger, then terminal can choose the lower pixel mould of pixel Formula.
Such as can choose the photographing mode of 300,000 pixels when area is bigger, it can choose when area is smaller The photographing mode of 3000000 pixels.
S203, terminal device scan sweep object with the first voxel model.
In embodiments of the present invention, terminal device obtains area of the sweep object in preview pane first under preview mode Than then terminal device determines that the corresponding voxel model of the area ratio is the first voxel model, finally according to the area ratio Terminal device scans sweep object according to first voxel model.Wherein, which is the ratio of the first area and second area Value, the first area are sweep object area shared in preview pane, and second area is the area of preview pane.Due to terminal device It is according to the voxel model of above-mentioned area ratio selection scanning, for the same sweep object, the sweep object is apart from terminal device When closer, area of the sweep object in preview pane is bigger, and terminal device can select this biggish when area is bigger The corresponding voxel model of area ratio, when the sweep object apart from terminal device farther out when, face of the sweep object in preview pane Product is smaller, and the corresponding voxel model of the lesser area ratio can also be selected when area is smaller, is manually adjusted without user, Therefore, compared to existing by the way of fixed power consumption scanning, scan method provided in an embodiment of the present invention can be adjusted neatly The power consumption for saving terminal device, can not only reduce terminal device in the power consumption of one sweep object of short range scanning, can also mention Accuracy of the high terminal device in one sweep object of long-range scanning.
A kind of possible implementation, in scan method provided in an embodiment of the present invention, above-mentioned S201 can specifically pass through S201a and S201b is realized.
S201a, terminal device obtain the first area and second area.
Wherein, the first area is the region that surrounds of profile or the face of the Minimum Area including sweep object of sweep object Product.
It should be noted that can be configured with the size or area of each preview pane in terminal device, terminal device makes When with barcode scanning region in that application, just using the area of the preview pane in the application.
S201b, terminal device obtain the area ratio according to the first area and second area.
Based on the program, the area in the region that terminal device is surrounded according to the profile of sweep object or including the scanning pair The area of the Minimum Area of elephant is determined as the first area, and terminal device can obtain area according to the first area and second area Than, and then terminal device can voxel model more corresponding than determination according to area.
Specifically, terminal device can obtain the first area according to S201a1 and S201a2.
S201a1, terminal device determine the target area in preview pane.
Wherein, target area is the region that surrounds of profile of sweep object or the Minimum Area including sweep object.
Optionally, terminal by where the boundary of sweep object a rectangular area or border circular areas be determined as target area Domain.
It should be noted that in the embodiment of the present invention, the region including sweep object can be the region of rule, can also be with For irregular region, the present invention is not especially limit this.
Illustratively, Fig. 3 is a kind of scanning interface schematic diagram provided in an embodiment of the present invention.As shown in (a) in Fig. 3, A length of X1 and width are that the region where the rectangle frame of Y1 is preview pane, the area S1=X1*Y1 of the preview pane.In the barcode scanning frame Two dimensional code is the two dimensional code of a rectangle, then terminal device can be using a length of X2 and width is the region where the dotted line frame of Y2 as mesh Region is marked, the area S2=X2*Y2 in the region, then area ratio is (X2*Y2)/(X1*Y1).It is a length of as shown in (b) in Fig. 3 X1 and width are that the region where the rectangle frame of Y1 is preview pane, the area S1=X1*Y1 of the preview pane.Two dimension in the barcode scanning frame Code is a circular two dimensional code (effective coverage is rectangle), then terminal device can be for the region where the circle of X3 with diameter Target area, the area in the region are S3=(X3)2/ 4, then area ratio is (X3)2/4(X1*Y1)。
It should be noted that in the embodiment of the present invention, target area this can having for the two dimensional code in (b) in Fig. 3 The area in region is imitated, the present invention is not especially limit this.
The area of target area is determined as the first area by S201a2, terminal device.
Specifically, terminal can determine the area of target area according to the method for existing image procossing.
Based on the program, the region that terminal device can surround the profile of sweep object in preview pane, or including mesh The Minimum Area of mark object is determined as target area, and terminal can be using the area of target area as the first area, and then terminal Area ratio can be determined in conjunction with the area of preview pane, according to area than determining voxel model, terminal is swept according to one The accounting for retouching the practical area in preview pane of object determines that the suitable voxel model of a power is swept according to the voxel model A sweep object is retouched, the power consumption of terminal device can be reduced in the case where guaranteeing can identify.
A kind of possible implementation, in scan method provided in an embodiment of the present invention, above-mentioned S202 be can specifically include S202a and S202b:
S202a, terminal device determine the first interval where the area ratio according to the area ratio.
Wherein, first interval is a section in preset multiple sections, and each section in multiple sections is right respectively Answer a voxel model.
Illustratively, table 1 is that section where a kind of area ratio provided in an embodiment of the present invention and the corresponding of voxel model are closed System.
Table 1
Voxel model Pixel-parameters Area ratio section
300000 640*480 Section 1
500000 800*600 Section 2
800000 1024*768 Section 3
1300000 1280*960 Section 4
2000000 1600*1200 Section 5
3100000 2048*1800 Section 6
4300000 2400*1800 Section 7
5000000 2560*1920 Section 8
6000000 3000*2000 Section 9
8000000 3264*2488 Section 10
11000000 4080*2720 Section 11
14000000 4536*3024 Section 12
It should be noted that above-mentioned table 1 is only for illustrating currently used voxel model, specifically, in terminal device It can choose several voxel models therein, also can choose whole voxel models therein, if the picture selected in terminal device Plain mode is above-mentioned partial pixel mode, then the number of the voxel model selected in terminal device is a of preset multiple sections It counts, the numerical value of the upper limit of the lower limit and second section in first section between two neighboring section is continuous, real for the present invention It applies example and this is not especially limited.
It should be noted that the upper limit value in section subtracts with the increase of pixel where area ratio in the embodiment of the present invention It is small.
The corresponding voxel model of first interval is determined as the first voxel model by S202b, terminal device.
Based on the program, terminal device can determine a voxel model than the section at place according to area, the pixel mould Formula and the area ratio have corresponding relationship, and when area ratio is bigger, the selection lesser mode of pixel can reduce power consumption, and area is got over It is small, select the biggish mode of pixel that can guarantee the accuracy of identification.
Optionally, power consumption of the camera in terminal device under the second voxel model is less than camera in third pixel mould Power consumption under formula, the second voxel model are voxel model corresponding with the second interval in multiple sections, and third voxel model is Voxel model corresponding with the 3rd interval in multiple sections, the maximum value of second interval are less than the minimum value of 3rd interval.
Optionally, the first resolution of camera is less than the second resolution of camera;First resolution is in the second picture Under plain mode, the resolution ratio of camera;Second resolution is the resolution ratio of camera under third voxel model.
It should be noted that the pixel value of the picture obtained with camera shooting defines camera in the embodiment of the present invention Resolution ratio, naturally it is also possible to the resolution ratio of camera is defined using other parameters, the embodiment of the present invention does not limit this specifically It is fixed.
The switch logic schematic diagram of Fig. 4 voxel model provided in an embodiment of the present invention.Illustratively, (a) in Fig. 4 and figure (b) in 4 is the switch logic schematic diagram of the first voxel model, wherein (a) in Fig. 4 is the switching mode of " four-in-one ", It is focused on for the photosensitive unit in the different color channel of RGB color chip, G00, G01, G10, G11 in (a) in Fig. 4 For a channel of green;G22, G23, G32, G33 are another channel of green;R02, R03, R12, R13 are the one of red A channel;B20, B21, B30, B31 are a channel of blue.Assuming that (a) in Fig. 4 is voxel model 1, (b) in Fig. 4 is Voxel model 2, when the voxel model that terminal device uses is voxel model 1, terminal device acquires the data of 16 photosensitive units, The data of 4*4 are handled, when the voxel model that terminal device uses is voxel model 2, terminal device acquires 16 photosensitive units Data, but terminal device can only handle the data of 2*2.(d) in (c) and Fig. 4 in Fig. 4 is " crop cutting method ", Wherein, (c) in Fig. 4 includes 16 photosensitive units, and terminal device is in mode 1 to each photosensitive unit of 16 photosensitive units Data are acquired, when terminal device only acquires data to 4 photosensitive units of 16 photosensitive units under mode 2.
It should be noted that Fig. 4 is only for exemplary illustration, the arrangement mode of specific photosensitive unit can in Fig. 4 It is identical, can also be with difference in Fig. 4, the present invention is not especially limit this.
Optionally, the corresponding sample frequency of first resolution is less than the corresponding sample frequency of second resolution.
It should be noted that terminal device is right under second resolution in conjunction with shown in (d) in (c) and Fig. 4 in Fig. 4 Should can be with the data of 16 photosensitive units shown in (c) in sample graph 4, i.e., the data of each photosensitive unit will processed one It is secondary;When terminal device is when first resolution scans, then can 4 photosensitive units shown in (d) in sample graph 4 number According to that is, only the data of whole photosensitive units of sampling 1/4 are handled.
It is appreciated that when the corresponding sample frequency of first resolution is less than second resolution corresponding sample frequency, Terminal device is smaller using the power consumption of first resolution.
A kind of possible implementation, in scan method provided in an embodiment of the present invention, above-mentioned S203 can pass through S203a It executes.
S203a, terminal device scan sweep object in the case where terminal device is in and puts out screen state with the first voxel model.
It should be noted that being put out under screen state when terminal is in, terminal can be according to preset item in the embodiment of the present invention The camera that part starts terminal obtains size of the sweep object in barcode scanning frame, so that terminal can pass through inspection in the case where putting out screen state The input surveyed in user determines whether to open camera.For example, the chip of low-power consumption can be used, the chip of the low-power consumption can be with The environment in visual field can be scanned in terminal device in the case where putting out screen state.
In turn, scan method provided in an embodiment of the present invention further includes S204:
After scanning sweep object, controlling terminal equipment is switched to bright screen state, and sets in terminal for S204, terminal device The information of standby display screen display sweep object.
It should be noted that after terminal device scans successfully a sweep object in the case where putting out screen state, terminal device Controlling terminal equipment is switched to bright screen state again, and can be in the information of the display screen display sweep object of terminal device, example Such as the two dimensional code that sweep object is a gathering, then terminal device can show the interface of payment on a display screen.
Based on the program, terminal device can first obtain sweep object face shared in barcode scanning frame in the case where putting out screen state Product ratio, face, terminal device can determine the first voxel model according to area, then according to the first voxel model in scanning scanning pair As after the scanning, terminal device shows the content of the sweep object again, on the one hand, put out screen under with the first voxel model not only The power consumption of camera can be reduced, bright screen shows that the information of sweep object can also further reduce terminal device again after scanning Power consumption.
Optionally, after S202, scan method provided in an embodiment of the present invention further includes S205:
If the power consumption of S205, object pixel mode is not equal to the power consumption of the first voxel model, terminal device is by object pixel Pattern switching is the first voxel model.
It wherein, is the currently employed voxel model of terminal device with object pixel mode.
It, can also be with it should be noted that terminal device can restore after the completion of each scanning to the voxel model of default Current voxel model is kept, when scanning again, area ratio can be reacquired, redefine voxel model according to area, this Inventive embodiments are not especially limited this.
Optionally, object pixel mode can be the voxel model of same low-power consumption every time, under preview mode Area ratio can be obtained with the voxel model of the low-power consumption, the present invention is not especially limit this.
Based on the program, terminal device determines sweep object after the area ratio of preview pane each, however, it is determined that first Voxel model is different from the power consumption of the currently employed voxel model of terminal device, then terminal device can be by currently employed pixel Pattern switching is the first voxel model, if the first voxel model and currently employed voxel model are the same mode, Huo Zhegong Consume it is identical, then terminal device can be directly used first voxel model scanning sweep object.
Fig. 5 is a kind of possible structural schematic diagram of terminal device provided in an embodiment of the present invention, as shown in figure 5, terminal is set Standby includes obtaining module 501, determining module 502 and scan module 503;Module 501 is obtained, is swept for being obtained under preview mode Area ratio of the object in preview pane is retouched, which is the ratio of the first area and second area, and the first area is scanning pair As shared area in preview pane, second area is the area of preview pane;Determining module 502, for according to acquisition module 501 The area ratio obtained determines the first voxel model corresponding with the area ratio;Scan module 503, for determining module 502 The first determining voxel model scans sweep object.
Optionally, determining module 502 is specifically used for: according to the area ratio, determine the first interval where the area ratio, the One section is a section in preset multiple sections, and each section in multiple sections respectively corresponds a voxel model; The corresponding voxel model of first interval is determined as the first voxel model.
Optionally, power consumption of the camera in terminal device under the second voxel model is less than camera in third pixel mould Power consumption under formula, the second voxel model are voxel model corresponding with the second interval in multiple sections, and third voxel model is Voxel model corresponding with the 3rd interval in multiple sections, the maximum value of second interval are less than the minimum value of 3rd interval.
Optionally, the first resolution of camera is less than the second resolution of camera;First resolution is in the second picture Under plain mode, the resolution ratio of camera;Second resolution is the resolution ratio of camera under third voxel model.
Optionally, the corresponding sample frequency of first resolution is less than the corresponding sample frequency of second resolution.
Optionally, in conjunction with Fig. 5, as shown in fig. 6, terminal device further includes display module 504;Scan module 503, it is specific to use In in the case where terminal device is in and puts out screen state, sweep object is scanned with the first voxel model that determining module 502 determines;Show mould Block 504, for after scan module 503 scans sweep object, controlling terminal equipment to be switched to bright screen state, and sets in terminal The information of standby display screen display sweep object.
Optionally, it obtains module 501 to be specifically used for: obtaining the first area and second area, the first area is sweep object The region that surrounds of profile or the Minimum Area including sweep object area;According to the first area and second area, obtain The area ratio.
Optionally, in conjunction with Fig. 5, as shown in fig. 7, terminal device 500 further include: switching module 505;Switching module 505 is used Compare according to area in determining module 502, after determining the first voxel model corresponding with the area ratio, if object pixel module The power consumption of formula is not equal to the power consumption of the first block of pixels formula, is the first voxel model by object pixel pattern switching;Wherein, target Voxel model is the currently employed voxel model of terminal device 500.
Terminal device 500 provided in an embodiment of the present invention can be realized terminal device in above method embodiment realize it is each A process, to avoid repeating, which is not described herein again.
Terminal device provided in an embodiment of the present invention, terminal device obtain sweep object in preview first under preview mode Area ratio in frame, then terminal device determines that the corresponding voxel model of the area ratio is the first picture according to the area ratio Plain mode, last terminal device scan sweep object according to first voxel model.Wherein, which is the first area and the The ratio of two areas, the first area are sweep object area shared in preview pane, and second area is the area of preview pane.By In terminal device be according to the voxel model of above-mentioned area ratio selection scanning, for the same sweep object, the sweep object away from When closer from terminal device, area of the sweep object in preview pane is bigger, and terminal device can be selected when area is bigger Select the corresponding voxel model of the biggish area ratio, when the sweep object apart from terminal device farther out when, the sweep object is pre- The area look in frame is smaller, the corresponding voxel model of the lesser area ratio can also be selected when area is smaller, without using Family manually adjusts, therefore, compared to existing by the way of fixed power consumption scanning, scan method provided in an embodiment of the present invention, The power consumption of terminal device can be neatly adjusted, can not only reduce terminal device in the function of one sweep object of short range scanning Consumption, can also improve terminal device in the accuracy of one sweep object of long-range scanning.
A kind of hardware structural diagram of Fig. 8 terminal device of each embodiment to realize the present invention, the terminal device 100 Including but not limited to: radio frequency unit 101, audio output unit 103, input unit 104, sensor 105, is shown network module 102 Show the components such as unit 106, user input unit 107, interface unit 108, memory 109, processor 110 and power supply 111. It will be understood by those skilled in the art that terminal device structure shown in Fig. 8 does not constitute the restriction to terminal device, terminal is set Standby may include perhaps combining certain components or different component layouts than illustrating more or fewer components.In the present invention In embodiment, terminal device include but is not limited to mobile phone, tablet computer, laptop, palm PC, vehicle-mounted terminal equipment, Wearable device and pedometer etc..
Wherein, processor 110, for obtaining area ratio of the sweep object in preview pane, the area under preview mode Than the ratio for the first area and second area, the first area is sweep object area shared in preview pane, second area For the area of preview pane;And according to the area ratio of acquisition, the first voxel model corresponding with the area ratio is determined;Sensor 105, for scanning sweep object with the first voxel model.
Terminal device provided in an embodiment of the present invention, terminal device obtain sweep object in preview first under preview mode Area ratio in frame, then terminal device determines that the corresponding voxel model of the area ratio is the first picture according to the area ratio Plain mode, last terminal device scan sweep object according to first voxel model.Wherein, which is the first area and the The ratio of two areas, the first area are sweep object area shared in preview pane, and second area is the area of preview pane.By In terminal device be according to the voxel model of above-mentioned area ratio selection scanning, for the same sweep object, the sweep object away from When closer from terminal device, area of the sweep object in preview pane is bigger, and terminal device can be selected when area is bigger Select the corresponding voxel model of the biggish area ratio, when the sweep object apart from terminal device farther out when, the sweep object is pre- The area look in frame is smaller, the corresponding voxel model of the lesser area ratio can also be selected when area is smaller, without using Family manually adjusts, therefore, compared to existing by the way of fixed power consumption scanning, scan method provided in an embodiment of the present invention, The power consumption of terminal device can be neatly adjusted, can not only reduce terminal device in the function of one sweep object of short range scanning Consumption, can also improve terminal device in the accuracy of one sweep object of long-range scanning.
It should be understood that the embodiment of the present invention in, radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal Send and receive, specifically, by from base station downlink data receive after, to processor 110 handle;In addition, by uplink Data are sent to base station.In general, radio frequency unit 101 includes but is not limited to antenna, at least one amplifier, transceiver, coupling Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 101 can also by wireless communication system and network and other set Standby communication.
Terminal device provides wireless broadband internet by network module 102 for user and accesses, and such as user is helped to receive It sends e-mails, browse webpage and access streaming video etc..
Audio output unit 103 can be received by radio frequency unit 101 or network module 102 or in memory 109 The audio data of storage is converted into audio signal and exports to be sound.Moreover, audio output unit 103 can also provide and end The relevant audio output of specific function that end equipment 100 executes is (for example, call signal receives sound, message sink sound etc. Deng).Audio output unit 103 includes loudspeaker, buzzer and receiver etc..
Input unit 104 is for receiving audio or video signal.Input unit 104 may include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or network module 102.Mike Wind 1042 can receive sound, and can be audio data by such acoustic processing.Treated audio data can be The format output that mobile communication base station can be sent to via radio frequency unit 101 is converted in the case where telephone calling model.
Terminal device 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when terminal device 100 is moved in one's ear Display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, it can detect that size and the direction of gravity when static, can be used to identify terminal device posture (ratio Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);It passes Sensor 105 can also include fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, wet Meter, thermometer, infrared sensor etc. are spent, details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generate the use with terminal device Family setting and the related key signals input of function control.Specifically, user input unit 107 include touch panel 1071 and Other input equipments 1072.Touch panel 1071, also referred to as touch screen collect the touch operation of user on it or nearby (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel 1071 Neighbouring operation).Touch panel 1071 may include both touch detecting apparatus and touch controller.Wherein, touch detection Device detects the touch orientation of user, and detects touch operation bring signal, transmits a signal to touch controller;Touch control Device processed receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 110, receiving area It manages the order that device 110 is sent and is executed.Furthermore, it is possible to more using resistance-type, condenser type, infrared ray and surface acoustic wave etc. Seed type realizes touch panel 1071.In addition to touch panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can include but is not limited to physical keyboard, function key (such as volume control button, Switch key etc.), trace ball, mouse, operating stick, details are not described herein.
Further, touch panel 1071 can be covered on display panel 1061, when touch panel 1071 is detected at it On or near touch operation after, send processor 110 to determine the type of touch event, be followed by subsequent processing device 110 according to touching The type for touching event provides corresponding visual output on display panel 1061.Although in fig. 8, touch panel 1071 and display Panel 1061 is the function that outputs and inputs of realizing terminal device as two independent components, but in some embodiments In, can be integrated by touch panel 1071 and display panel 1061 and realize the function that outputs and inputs of terminal device, it is specific this Place is without limitation.
Interface unit 108 is the interface that external device (ED) is connect with terminal device 100.For example, external device (ED) may include having Line or wireless head-band earphone port, external power supply (or battery charger) port, wired or wireless data port, storage card end Mouth, port, the port audio input/output (I/O), video i/o port, earphone end for connecting the device with identification module Mouthful etc..Interface unit 108 can be used for receiving the input (for example, data information, electric power etc.) from external device (ED) and By one or more elements that the input received is transferred in terminal device 100 or can be used in 100 He of terminal device Data are transmitted between external device (ED).
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of terminal device, utilizes each of various interfaces and the entire terminal device of connection A part by running or execute the software program and/or module that are stored in memory 109, and calls and is stored in storage Data in device 109 execute the various functions and processing data of terminal device, to carry out integral monitoring to terminal device.Place Managing device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Terminal device 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, to realize management charging by power-supply management system, put The functions such as electricity and power managed.
In addition, terminal device 100 includes some unshowned functional modules, details are not described herein.
Optionally, the embodiment of the present invention also provides a kind of terminal device, in conjunction with Fig. 8, including processor 110, memory 109, it is stored in the computer program that can be run on memory 109 and on processor 110, the computer program is by processor 110 realize each process of above-mentioned scan method embodiment when executing, and can reach identical technical effect, to avoid repeating, Which is not described herein again.
The embodiment of the present invention also provides a kind of computer readable storage medium, and meter is stored on computer readable storage medium Calculation machine program, the computer program realize each process of above-mentioned scan method embodiment when being executed by processor, and can reach Identical technical effect, to avoid repeating, which is not described herein again.Wherein, the computer readable storage medium is deposited Ru read-only Reservoir (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or CD etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form belongs within protection of the invention.

Claims (18)

1. a kind of scan method is applied to terminal device, which is characterized in that the described method includes:
Area ratio of the sweep object in preview pane is obtained under preview mode, the area ratio is the first area and second area Ratio, first area is sweep object area shared in the preview pane, and the second area is described The area of preview pane;
According to the area ratio, the first voxel model corresponding with the area ratio is determined;
The sweep object is scanned with first voxel model.
2. the method according to claim 1, wherein described according to the area ratio, the determining and area ratio Corresponding first voxel model, comprising:
According to the area ratio, determine that the first interval where the area ratio, the first interval are preset multiple sections In a section, each section in the multiple section respectively corresponds a voxel model;
The corresponding voxel model of the first interval is determined as first voxel model.
3. according to the method described in claim 2, it is characterized in that, the camera in the terminal device is in the second voxel model Under power consumption be less than power consumption of the camera under third voxel model, second voxel model be and the multiple section In the corresponding voxel model of second interval, the third voxel model be it is corresponding with the 3rd interval in the multiple section Voxel model, the maximum value of the second interval are less than the minimum value of the 3rd interval.
4. according to the method described in claim 3, it is characterized in that, the first resolution of the camera is less than the camera Second resolution;The first resolution is the resolution ratio of the camera under second voxel model;Described second Resolution ratio is the resolution ratio of the camera under the third voxel model.
5. according to the method described in claim 4, it is characterized in that, the corresponding sample frequency of the first resolution is less than second The corresponding sample frequency of resolution ratio.
6. the method according to any one of claims 1 to 5, which is characterized in that described to be swept with first voxel model Retouch the sweep object, comprising:
In the case where the terminal device is in and puts out screen state, the sweep object is scanned with first voxel model;
The method also includes:
After scanning the sweep object, controls the terminal device and be switched to bright screen state, and in the terminal device Show the information of sweep object described in screen display.
7. the method according to claim 1, wherein the sweep object that obtains under preview mode is in preview pane In area ratio, comprising:
First area and the second area are obtained, first area is the region that the profile of the sweep object surrounds Or the area of the Minimum Area including the sweep object;
According to first area and the second area, the area ratio is obtained.
8. the method according to claim 1, wherein described according to the area ratio, the determining and area After corresponding first voxel model, the method also includes:
If the power consumption of object pixel mode is not equal to the power consumption of first voxel model, it is by the object pixel pattern switching First voxel model;
Wherein, the object pixel mode is the currently employed voxel model of the terminal device.
9. a kind of terminal device, which is characterized in that the terminal device includes obtaining module, determining module and scan module;
The acquisition module, for obtaining area ratio of the sweep object in preview pane under preview mode, the area ratio is The ratio of first area and second area, first area are sweep object area shared in the preview pane, The second area is the area of the preview pane;
The determining module, the area ratio for being obtained according to the acquisition module, determination are corresponding with the area ratio First voxel model;
The scan module, first voxel model for being determined with the determining module scan the sweep object.
10. terminal device according to claim 9, which is characterized in that the determining module is specifically used for:
According to the area ratio, determine that the first interval where the area ratio, the first interval are preset multiple sections In a section, each section in the multiple section respectively corresponds a voxel model;
The corresponding voxel model of the first interval is determined as first voxel model.
11. terminal device according to claim 10, which is characterized in that the camera in the terminal device is in the second picture Power consumption under plain mode is less than power consumption of the camera under third voxel model, second voxel model be with it is described more The corresponding voxel model of second interval in a section, the third voxel model are and the 3rd interval in the multiple section Corresponding voxel model, the maximum value of the second interval are less than the minimum value of the 3rd interval.
12. terminal device according to claim 11, which is characterized in that the first resolution of the camera is less than described The second resolution of camera;The first resolution is the resolution ratio of the camera under second voxel model;Institute Stating second resolution is the resolution ratio of the camera under the third voxel model.
13. terminal device according to claim 12, which is characterized in that the corresponding sample frequency of the first resolution is small In the corresponding sample frequency of second resolution.
14. according to the described in any item terminal devices of claim 9 to 13, which is characterized in that the terminal device further includes showing Show module;
The scan module, specifically for the institute in the case where the terminal device is in and puts out screen state, determined with the determining module It states the first voxel model and scans the sweep object;
The display module, for after the scan module scans the sweep object, controlling the terminal device switching For bright screen state, and the information of the sweep object described in the display screen display of the terminal device.
15. terminal device according to claim 9, which is characterized in that the acquisition module is specifically used for:
First area and the second area are obtained, first area is the region that the profile of the sweep object surrounds Or the area of the Minimum Area including the sweep object;
According to first area and the second area, the area ratio is obtained.
16. terminal device according to claim 9, which is characterized in that the terminal device equipment further include: switching mould Block;
The switching module, user is after the determining module determines corresponding first voxel model of the area ratio, if mesh The power consumption for marking voxel model is not equal to the power consumption of first voxel model, and the terminal device cuts the object pixel mode It is changed to first voxel model;
Wherein, the target object pixel mode is the currently employed voxel model of the terminal device.
17. a kind of terminal device, which is characterized in that the terminal device includes processor, memory and is stored in the storage On device and the computer program that can run on the processor, realized such as when the computer program is executed by the processor The step of scan method described in any item of the claim 1 to 8.
18. a kind of computer readable storage medium, which is characterized in that store computer journey on the computer readable storage medium Sequence realizes the step such as scan method described in any item of the claim 1 to 8 when the computer program is executed by processor Suddenly.
CN201811557207.3A 2018-12-19 2018-12-19 Scanning method and terminal equipment Active CN109858303B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811557207.3A CN109858303B (en) 2018-12-19 2018-12-19 Scanning method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811557207.3A CN109858303B (en) 2018-12-19 2018-12-19 Scanning method and terminal equipment

Publications (2)

Publication Number Publication Date
CN109858303A true CN109858303A (en) 2019-06-07
CN109858303B CN109858303B (en) 2022-05-06

Family

ID=66891591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811557207.3A Active CN109858303B (en) 2018-12-19 2018-12-19 Scanning method and terminal equipment

Country Status (1)

Country Link
CN (1) CN109858303B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000013549A (en) * 1998-06-19 2000-01-14 Olympus Optical Co Ltd Image capture device
KR20100002763A (en) * 2008-06-30 2010-01-07 삼성전자주식회사 Image processing apparatus and image processing method thereof
CN101908125A (en) * 2010-06-01 2010-12-08 福建新大陆电脑股份有限公司 QR (Quick Response) bar code decoding chip and decoding method thereof
CN104410785A (en) * 2014-11-17 2015-03-11 联想(北京)有限公司 An information processing method and electronic device
CN104794421A (en) * 2015-04-29 2015-07-22 华中科技大学 QR (quick response) code positioning and recognizing methods
CN107071264A (en) * 2017-01-13 2017-08-18 维沃移动通信有限公司 A kind of image resolution ratio method of adjustment and mobile terminal
CN109033912A (en) * 2018-07-25 2018-12-18 维沃移动通信有限公司 A kind of recognition methods of identification code and mobile terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000013549A (en) * 1998-06-19 2000-01-14 Olympus Optical Co Ltd Image capture device
KR20100002763A (en) * 2008-06-30 2010-01-07 삼성전자주식회사 Image processing apparatus and image processing method thereof
CN101908125A (en) * 2010-06-01 2010-12-08 福建新大陆电脑股份有限公司 QR (Quick Response) bar code decoding chip and decoding method thereof
CN104410785A (en) * 2014-11-17 2015-03-11 联想(北京)有限公司 An information processing method and electronic device
CN104794421A (en) * 2015-04-29 2015-07-22 华中科技大学 QR (quick response) code positioning and recognizing methods
CN107071264A (en) * 2017-01-13 2017-08-18 维沃移动通信有限公司 A kind of image resolution ratio method of adjustment and mobile terminal
CN109033912A (en) * 2018-07-25 2018-12-18 维沃移动通信有限公司 A kind of recognition methods of identification code and mobile terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘晓晖: "用于远距离人脸识别的超分辨率图像恢复研究", 《中国优秀博硕士学位论文全文数据库(硕士)》 *
蓝杰等: "基于BP神经网络二维码区域提取", 《微型机与应用》 *

Also Published As

Publication number Publication date
CN109858303B (en) 2022-05-06

Similar Documents

Publication Publication Date Title
CN107436685A (en) Display device, self luminous display panel and gesture identification method
CN109151180A (en) A kind of object identifying method and mobile terminal
CN108989668A (en) A kind of working method and mobile terminal of camera
CN109743498A (en) A kind of shooting parameter adjustment method and terminal device
CN108989678A (en) A kind of image processing method, mobile terminal
CN109828705A (en) A kind of display figure calibration method and terminal device
CN110069180A (en) A kind of function control method and terminal device
CN109521978A (en) A kind of content display method and terminal device
CN110442437A (en) A kind of application switching method and mobile terminal
CN107886321A (en) A kind of method of payment and mobile terminal
CN109857289A (en) Display control method and terminal device
CN109408171A (en) A kind of display control method and terminal
CN110519503A (en) A kind of acquisition methods and mobile terminal of scan image
CN110868546B (en) Shooting method and electronic equipment
CN109068063A (en) A kind of processing of 3 d image data, display methods, device and mobile terminal
CN108510266A (en) A kind of Digital Object Unique Identifier recognition methods and mobile terminal
CN109005314A (en) A kind of image processing method and terminal
CN109033913A (en) A kind of recognition methods of identification code and mobile terminal
CN109033912A (en) A kind of recognition methods of identification code and mobile terminal
CN110209324B (en) Display method and terminal equipment
CN109547700A (en) Photographic method and terminal
CN109993711A (en) A kind of image processing method and terminal device
CN109859718A (en) Screen brightness regulation method and terminal device
CN109117037A (en) A kind of method and terminal device of image procossing
CN109544140A (en) A kind of identification code scan method, terminal and readable storage medium storing program for executing

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