CN107277359A - Method, device, mobile terminal and the storage medium of adaptive zoom in 3D scannings - Google Patents
Method, device, mobile terminal and the storage medium of adaptive zoom in 3D scannings Download PDFInfo
- Publication number
- CN107277359A CN107277359A CN201710568650.XA CN201710568650A CN107277359A CN 107277359 A CN107277359 A CN 107277359A CN 201710568650 A CN201710568650 A CN 201710568650A CN 107277359 A CN107277359 A CN 107277359A
- Authority
- CN
- China
- Prior art keywords
- accounting
- preview image
- image
- current
- present
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/24—Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
- G01B11/25—Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
- G06T7/521—Depth or shape recovery from laser ranging, e.g. using interferometry; from the projection of structured light
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Optics & Photonics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
- Studio Devices (AREA)
Abstract
The present invention is suitable for 3D scanning techniques field there is provided method, device, mobile terminal and the storage medium of adaptive zoom a kind of 3D scannings, and methods described includes:Scan instruction is received, starts camera and image preview is carried out to scanning object;Obtain the present preview image of scanning object;According to the preview image and present preview image of previous frame, the boundary rectangle frame for obtaining Current Scan object is detected by dynamic outline, current accounting of the boundary rectangle frame in present preview image is calculated;According to the current accounting, digital zoom multiplying power of the adjustment camera to scanning object in external rectangle frame.The present invention, digital zoom is carried out to its preview image, and the image of the centre scan object of preview image is intercepted by image scaled, and then changes the angle of visual field, and the purpose of object is scanned from preview image is increased in visual effect, image preview frame per second is improved.
Description
Technical field
The invention belongs to the method for adaptive zoom, device, shifting in 3D scanning techniques field, more particularly to a kind of 3D scannings
Dynamic terminal and storage medium.
Background technology
Traditional 3D scanners typically carry out IMAQ using cameras with fixed focus, and the resolution ratio of industry camera is relative
It is not too high in existing mobile phone pixel, and the main frame of data processing is all the higher PC computers of performance, so general directly use
The image of original resolution is handled.By contrast, its operational capability phase of the 3D scanning systems based on mobile terminals such as mobile phones
To weaker, it is necessary to using less image in different resolution, and for real-time image acquisition, the mobile terminal of 3D scanning systems is all used
Preview image is as input picture, and preview image is camera original image has carried out down-sampled image.
All it is that preview image is obtained using constant focal length, if to be scanned in the existing 3D scanning systems based on mobile terminal
Object is smaller or during irregular object to be scanned, then in preview image object to be scanned because accounting is too small and resolution ratio too
Low, the 3D finally given model accuracy is poor.
The content of the invention
It is situated between the embodiments of the invention provide method, device, mobile terminal and the storage of adaptive zoom in a kind of 3D scannings
Matter, it is intended to solve in the existing 3D scanning systems based on mobile terminal, is all to obtain preview image using constant focal length, if waiting to sweep
When retouching smaller object or irregular object to be scanned, then in preview image object to be scanned because accounting is too small and resolution ratio too
It is low, the problem of 3D finally given model accuracy is poor.
In a first aspect, the embodiments of the invention provide the method for adaptive zoom in a kind of 3D scannings, it is adaptable to which 3D is scanned
The mobile terminal of 3D scannings is completed in system, the mobile terminal configuration has camera, and methods described includes:
Scan instruction is received, starts camera and image preview is carried out to scanning object;
Obtain the present preview image of scanning object;
According to the preview image and present preview image of previous frame, detected by dynamic outline and obtain Current Scan object
Boundary rectangle frame, calculates current accounting of the boundary rectangle frame in present preview image;
According to the current accounting, digital zoom multiplying power of the adjustment camera to scanning object in external rectangle frame.
Further, the preview image and present preview image according to previous frame, is detected by dynamic outline and obtained
The boundary rectangle frame of Current Scan object, calculates current accounting of the boundary rectangle frame in present preview image specific:
In maximum field of view's angle picture that present preview image is normalized to camera;
The preview image of present preview image after normalization and previous frame is subjected to difference, the foreign steamer of scanning object is obtained
It is wide;
According to the outline of the scanning object, the boundary rectangle frame of scanning object is obtained;
The accounting and the accounting of vertical direction of the horizontal direction of the boundary rectangle frame and current preview view are calculated, by institute
The maximum is stated in the accounting of horizontal direction and the accounting of vertical direction as current accounting.
Further, it is described according to the current accounting, numeral of the adjustment camera to scanning object in external rectangle frame
Zoom ratio is specific:
Judge the current accounting and the magnitude relationship of default accounting max-thresholds and default accounting minimum threshold;
If the current accounting is more than default accounting max-thresholds, the corresponding digital zoom of present preview image is reduced
Multiplying power;
If the current accounting is less than or equal to default accounting max-thresholds, and more than or equal to default accounting minimum threshold,
Then keep the corresponding digital zoom multiplying power of present preview image;
If the current accounting is less than default accounting minimum threshold, the corresponding digital zoom of increase present preview image
Multiplying power.
Further, the 3D scanning systems also include laser, and described according to the current accounting, adjustment camera is external
Connect in rectangle frame after the digital zoom multiplying power of scanning object, methods described also includes:
The laser strip region that laser is projected on scanning object is obtained, several 2D on the center line in laser strip region are extracted
Coordinate;
By several described 2D Coordinate Conversions is several 3D coordinates under camera coordinate system and are stored as 3D point cloud;
The image of boundary rectangle inframe is stored, present preview image is regard as previous frame preview image, object rotation to be scanned
After turning, obtain next frame preview image and be used as present preview image;
After 360 degree of scannings to be done, the 3D point cloud is subjected to trigonometric ratio, the 3D models of generation scanning object.
Further, it is described to obtain the laser strip region that laser is projected on scanning object, extract in laser strip region
On heart line after several 2D coordinates, methods described also includes:
To obtain several 2D coordinates are mapped to corresponding 2D coordinates under maximum field of view angle.
Second aspect, the embodiments of the invention provide the device of adaptive zoom in a kind of 3D scannings, it is adaptable to which 3D is scanned
The mobile terminal of 3D scannings is completed in system, the mobile terminal configuration has camera, and described device includes:
Sweep start unit, for receiving scan instruction, starts camera and carries out image preview to scanning object;
Image acquisition unit, the present preview image for obtaining scanning object;
Accounting acquiring unit, for the preview image and present preview image according to previous frame, is detected by dynamic outline
The boundary rectangle frame of Current Scan object is obtained, current accounting of the boundary rectangle frame in present preview image is calculated;
Digital zoom unit, for according to the current accounting, adjustment camera to be to scanning object in external rectangle frame
Digital zoom multiplying power.
Further, the accounting acquiring unit is specific:
Image normalizing module, for normalizing to present preview image in maximum field of view's angle picture of camera;
Profile acquisition module, for the preview image of the present preview image after normalization and previous frame to be carried out into difference,
Obtain the outline of scanning object;
External acquisition module, for the outline according to the scanning object, obtains the boundary rectangle frame of scanning object;
Accounting computing module, for the horizontal direction that calculates the boundary rectangle frame and current preview view accounting and hang down
Nogata to accounting, regard the maximum in the accounting of the accounting of the horizontal direction and vertical direction as current accounting.
Further, the digital zoom unit is specific:
Accounting judge module, for judging the current accounting and default accounting max-thresholds and default accounting minimum threshold
Size;
Multiplying power adjusts the first module, if being more than default accounting max-thresholds for the current accounting, reduces current
The corresponding digital zoom multiplying power of preview image;
Multiplying power adjusts the second module, if being less than or equal to default accounting max-thresholds for the current accounting, and is more than
Equal to default accounting minimum threshold, then the corresponding digital zoom multiplying power of present preview image is kept;
Multiplying power adjusts the 3rd module, if being less than default accounting minimum threshold for the current accounting, increase is current
The corresponding digital zoom multiplying power of preview image.
Further, the 3D scanning systems also include laser, and described device also includes:
Coordinate acquiring unit, for obtaining the laser strip region that laser is projected on scanning object, extracts laser strip region
Center line on several 2D coordinates;
Coordinate transformation unit, for being several 3D coordinates under camera coordinate system by several described 2D Coordinate Conversions
And it is stored as 3D point cloud;
Image storage unit, the image for storing boundary rectangle inframe, regard present preview image as previous frame preview
Image, after object rotation to be scanned, obtains next frame preview image and is used as present preview image;
Model generation unit, after 360 degree of scannings to be done, trigonometric ratio, generation scanning are carried out by the 3D point cloud
The 3D models of object.
Further, described device also includes:
Coordinate map unit, for will obtain several 2D coordinates are mapped to corresponding 2D coordinates under maximum field of view angle.
The third aspect, the embodiments of the invention provide a kind of mobile terminal, the mobile terminal include an at least processor,
Memory and interface, at least a processor, memory and the interface are connected by bus;
The memory storage computer program;
The computer program of memory storage described at least one described computing device so that the mobile terminal is performed
The method of adaptive zoom in above-mentioned 3D scannings.
Fourth aspect, the embodiments of the invention provide a kind of storage medium, be stored with computer journey on the storage medium
Sequence, the computer program realizes the method for adaptive zoom in above-mentioned 3D scannings when being executed by processor the step of.
The embodiment of the present invention, in scanning process, when scanning too small object or surface imperfection, is carried out to its preview image
Digital zoom, the image of the centre scan object of preview image is intercepted by image scaled, and then changes the angle of visual field, from visual effect
On increase in preview image scan object purpose, meanwhile, using boundary rectangle frame method eliminate scanning contour of object outside
Redundant image, reduce and the storage pressure of image and improve image preview frame per second, the precision improvement of final 3D models is also protected
The integrality of scan model is demonstrate,proved.
Brief description of the drawings
Fig. 1 is the implementation process figure of the method for adaptive zoom in the 3D scannings that the embodiment of the present invention one is provided;
Fig. 2 is the implementation process figure of the method for adaptive zoom in the 3D scannings that the embodiment of the present invention two is provided;
Fig. 3 is the structural representation of the device of adaptive zoom in the 3D scannings that the embodiment of the present invention three is provided;
Fig. 4 is the structural representation of the device of adaptive zoom in the 3D scannings that the embodiment of the present invention four is provided;
Fig. 5 is the structural representation for the mobile terminal that the embodiment of the present invention five is provided.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
The realization of the present invention is described in detail below in conjunction with specific embodiment:
Embodiment one
Fig. 1 shows the implementation process of the method for adaptive zoom in the 3D scannings that the embodiment of the present invention one is provided, and is described in detail
It is as follows:
It should be noted that the present embodiment and following examples complete the movement of 3D scannings suitable for 3D scanning systems
Terminal, the mobile terminal configuration has camera, including mobile phone, ipad, a flat board, the camera for it is common preposition or after
The single common camera put, or be one in double shootings.
In step S101, scan instruction is received, starts camera and image preview is carried out to scanning object.
The present embodiment, the scan instruction is that the startup that user is triggered by the touch-screen or button of mobile terminal is scanned
Instruction.
In step s 102, the present preview image of scanning object is obtained.
The present embodiment, the present preview image is to have carried out down-sampled image to the current original image of camera.
In step s 103, according to the preview image and present preview image of previous frame, detected and obtained by dynamic outline
The boundary rectangle frame of Current Scan object, calculates current accounting of the boundary rectangle frame in present preview image.
The present embodiment, the boundary rectangle frame is with scanning the minimum rectangle that the outline of object is bordered by, its boundary rectangle
The size of frame is identical with setting area-of-interest (Region of Interest, ROI).Scanning object is understood by current accounting
Size.This step S103 specifically includes following sub-step:
In sub-step S31, maximum field of view's angle picture that present preview image is normalized to camera;
Sub-step S32, carries out difference by the preview image of the present preview image after normalization and previous frame, is scanned
The outline of object;
Sub-step S33, according to the outline of the scanning object, obtains the boundary rectangle frame of scanning object;
Sub-step S34, calculates the accounting and vertical direction of the horizontal direction of the boundary rectangle frame and current preview view
Accounting, regard the maximum in the accounting of the accounting of the horizontal direction and vertical direction as current accounting.
In step S104, according to the current accounting, numeral of the adjustment camera to scanning object in external rectangle frame
Zoom ratio.
The present embodiment, digital zoom is carried out to its preview image, and the centre scan thing of preview image is intercepted by image scaled
The image of body, and then change the angle of visual field, the purpose of object is scanned from preview image is increased in visual effect, using external square
Shape frame method eliminates the redundant image outside scanning contour of object.It is described according to the current accounting, adjustment camera is to external
The digital zoom multiplying power of scanning object is specifically included in rectangle frame:
Judge the current accounting and the magnitude relationship of default accounting max-thresholds and default accounting minimum threshold;
Wherein, boundary rectangle frame of the accounting max-thresholds for default scanning object accounting in present preview image is preset
Upper threshold value, presets threshold of the accounting minimum threshold for boundary rectangle frame accounting in present preview image of default scanning object
It is worth lower limit.By judging following three kinds of situations occur, the corresponding digital zoom of present preview image is adjusted as the case may be
Multiplying power:
The first situation, if the current accounting is more than default accounting max-thresholds, reduces present preview image pair
The digital zoom multiplying power answered;
Wherein, α [i]=α [i-1]-δ, α [i] is the corresponding digital zoom multiplying power of present preview image, and α [i-1] is upper one
The corresponding digital zoom multiplying power of frame preview image, δ digital zoom multiplying power adjusted values are by maximum zoom multiplying power β and zoom factor θ phases
It is multiplied to arrive, the ratio of maximum zoom multiplying power β=maximum original resolution and preview resolution, such as original image a width of 4096,
Preview resolution pixel a width of 1280, then β=3.2;Zoom factor θ takes 0~1, and smaller then zoom is slower, but image is more smart
Carefully, more big then zoom is faster, but relatively rough;If θ takes 0.1, δ=3.2*0.1=0.32.
Second of situation, if the current accounting is less than or equal to default accounting max-thresholds, and is accounted for more than or equal to default
Than minimum threshold, then the corresponding digital zoom multiplying power of present preview image is kept;
The third situation, if the current accounting is less than default accounting minimum threshold, increases present preview image pair
The digital zoom multiplying power answered.
Wherein, α [i]=α [i-1]+δ, α [i] is the corresponding digital zoom multiplying power of present preview image, and α [i-1] is upper one
The corresponding digital zoom multiplying power of frame preview image, δ digital zoom multiplying power adjusted values.
The present embodiment, in scanning process, when scanning too small object or surface imperfection (i.e. its profile is changed), to it
Preview image carries out digital zoom, the image of the centre scan object of preview image is intercepted by image scaled, and then change visual field
Angle, scans the purpose of object from preview image is increased in visual effect, meanwhile, eliminated and swept using boundary rectangle frame method
Retouch the redundant image outside contour of object.
Embodiment two
Fig. 2 shows the implementation process of the method for adaptive zoom in the 3D scannings that the embodiment of the present invention two is provided, and is described in detail
It is as follows:
In step s 201, scan instruction is received, starts camera and image preview is carried out to scanning object.
The present embodiment, the scan instruction is that the startup that user is triggered by the touch-screen or button of mobile terminal is scanned
Instruction.
In step S202, the present preview image of scanning object is obtained.
The present embodiment, the present preview image is to have carried out down-sampled image to the current original image of camera.
In step S203, according to the preview image and present preview image of previous frame, detected and obtained by dynamic outline
The boundary rectangle frame of Current Scan object, calculates current accounting of the boundary rectangle frame in present preview image.
The present embodiment, the boundary rectangle frame is with scanning the minimum rectangle that the outline of object is bordered by, its boundary rectangle
The size of frame is identical with setting area-of-interest (Region of Interest, ROI).Scanning object is understood by current accounting
Size.This step S103 specifically includes following sub-step:
In sub-step S31, maximum field of view's angle picture that present preview image is normalized to camera;
Sub-step S32, carries out difference by the preview image of the present preview image after normalization and previous frame, is scanned
The outline of object;
Sub-step S33, according to the outline of the scanning object, obtains the boundary rectangle frame of scanning object;
Sub-step S34, calculates the accounting and vertical direction of the horizontal direction of the boundary rectangle frame and current preview view
Accounting, regard the maximum in the accounting of the accounting of the horizontal direction and vertical direction as current accounting.
In step S204, according to the current accounting, numeral of the adjustment camera to scanning object in external rectangle frame
Zoom ratio.
The present embodiment, digital zoom is carried out to its preview image, and the centre scan thing of preview image is intercepted by image scaled
The image of body, and then change the angle of visual field, the purpose of object is scanned from preview image is increased in visual effect, using external square
Shape frame method eliminates the redundant image outside scanning contour of object.It is described according to the current accounting, adjustment camera is to external
The digital zoom multiplying power of scanning object is specifically included in rectangle frame:
Judge the current accounting and the magnitude relationship of default accounting max-thresholds and default accounting minimum threshold;
Wherein, boundary rectangle frame of the accounting max-thresholds for default scanning object accounting in present preview image is preset
Upper threshold value, presets threshold of the accounting minimum threshold for boundary rectangle frame accounting in present preview image of default scanning object
It is worth lower limit.By judging following three kinds of situations occur, the corresponding digital zoom of present preview image is adjusted as the case may be
Multiplying power:
The first situation, if the current accounting is more than default accounting max-thresholds, reduces present preview image pair
The digital zoom multiplying power answered;
Wherein, α [i]=α [i-1]-δ, α [i] is the corresponding digital zoom multiplying power of present preview image, and α [i-1] is upper one
The corresponding digital zoom multiplying power of frame preview image, δ digital zoom multiplying power adjusted values are by maximum zoom multiplying power β and zoom factor θ phases
It is multiplied to arrive, the ratio of maximum zoom multiplying power β=maximum original resolution and preview resolution, such as original image a width of 4096,
Preview resolution pixel a width of 1280, then β=3.2;Zoom factor θ takes 0~1, and smaller then zoom is slower, but finer, more
It is big then zoom is faster, but it is relatively rough;If θ takes 0.1, δ=3.2*0.1=0.32.
Second of situation, if the current accounting is less than or equal to default accounting max-thresholds, and is accounted for more than or equal to default
Than minimum threshold, then the corresponding digital zoom multiplying power of present preview image is kept;
The third situation, if the current accounting is less than default accounting minimum threshold, increases present preview image pair
The digital zoom multiplying power answered.
Wherein, α [i]=α [i-1]+δ, α [i] is the corresponding digital zoom multiplying power of present preview image, and α [i-1] is upper one
The corresponding digital zoom multiplying power of frame preview image, δ digital zoom multiplying power adjusted values.
In step S205, the laser strip region that laser is projected on scanning object is obtained, is extracted in laser strip region
Several 2D coordinates on heart line.
In the present embodiment, 3D scanning processes, the scanning object Rotating with Uniform being placed on turntable, laser projection is in scanning object
On laser strip region be Current Scan processing region, the laser be used for for 3D scan triangulation is provided.
It is preferred that, after this step S205, methods described also includes:
To obtain several 2D coordinates are mapped to corresponding 2D coordinates under maximum field of view angle.
Specifically, 2D coordinates (px, py) in boundary rectangle inframe image are obtained;Then obtain the coordinate (px+ in preview graph
Roi.x, py+roi.y), wherein roi.x represents that (roi.x, roi.y) represents coordinate of the roi upper left corners in preview image;Enter
And the coordinate ((px+roi.x-cx)/α+cx, (px+roi.x-cy)/α+cy) of pixel in camera original image is obtained, wherein α
Represent the multiplication factor of Digital Zoom.
Wherein, the preview graph obtained under the resolution ratio and unified different digital zoom ratio in order to make full use of camera
Picture, will obtain several 2D coordinates are mapped to corresponding 2D coordinates under maximum field of view angle.
In step S206, by several described 2D Coordinate Conversions is several 3D coordinates under camera coordinate system and deposit
Store up as 3D point cloud.
The present embodiment, 3D modeling is completed for the ease of scanning, is camera coordinate system by several described 2D Coordinate Conversions
Under several 3D coordinates and be stored as 3D point cloud, due to using boundary rectangle frame method eliminate scanning contour of object outside it is superfluous
Remaining image, reduces the storage pressure of image and improves the resolution ratio that image preview frame per second improves scanning object.
In step S207, the image of boundary rectangle inframe is stored, using present preview image as previous frame preview image,
After object rotation to be scanned, obtain next frame preview image and be used as present preview image.
The present embodiment, has handled after present preview image, the image of boundary rectangle inframe has been stored, by present preview image
As previous frame preview image, rotation obtains the next frame preview image of scanning object as present preview image, continues executing with
Step S202.
In step S208, after 360 degree of scannings to be done, the 3D point cloud is subjected to trigonometric ratio, generation scanning object
3D models.
The present embodiment, after being handled by successive ignition, turntable completes 360 degree of scannings, and mobile terminal is by the 3D point cloud
Carry out trigonometric ratio, the 3D models of generation scanning object.
The embodiment of the present invention, in scanning process, when scanning too small object or surface imperfection (i.e. its profile is changed),
Digital zoom is carried out to its preview image, the image of the centre scan object of preview image is intercepted by image scaled, and then change
The angle of visual field, scans the purpose of object from preview image is increased in visual effect, meanwhile, removed using boundary rectangle frame method
Redundant image outside scanning contour of object, reduces the storage pressure of image and improves image preview frame per second, final 3D moulds
The precision improvement of type, also ensure that the integrality of scan model.
Embodiment three
Fig. 3 shows the concrete structure block diagram of the device for the adaptive zoom that the embodiment of the present invention three is provided, it is adaptable to 3D
The mobile terminal of 3D scannings is completed in scanning system, the mobile terminal configuration has camera, for convenience of description, illustrate only
The part related to the embodiment of the present invention.In the present embodiment, this can the device of adaptive zoom include:Sweep start unit
31st, image acquisition unit 32, accounting acquiring unit 33 and digital zoom unit 34.
Wherein, sweep start unit 31, is connected with image acquisition unit 32, for receiving scan instruction, starts camera
Image preview is carried out to scanning object;
Image acquisition unit 32, is connected with sweep start unit 31, accounting acquiring unit 33, for obtaining scanning object
Present preview image;
Accounting acquiring unit 33, is connected with image acquisition unit 32, digital zoom unit 34, for being examined by dynamic outline
The boundary rectangle frame for obtaining Current Scan object is surveyed, current accounting of the boundary rectangle frame in present preview image is calculated;
Digital zoom unit 34, is connected with accounting acquiring unit 33, for according to the current accounting, adjusting camera pair
Boundary rectangle inframe scans the digital zoom multiplying power of object.
It is preferred that, the accounting acquiring unit 33 is specific:
Image normalizing module, for normalizing to present preview image in maximum field of view's angle picture of camera;
Profile acquisition module, for the preview image of the present preview image after normalization and previous frame to be carried out into difference,
Obtain the outline of scanning object;
External acquisition module, for the outline according to the scanning object, obtains the boundary rectangle frame of scanning object;
Accounting computing module, for the horizontal direction that calculates the boundary rectangle frame and current preview view accounting and hang down
Nogata to accounting, regard the maximum in the accounting of the accounting of the horizontal direction and vertical direction as current accounting.
It is preferred that, the digital zoom unit 34 is specific:
Accounting judge module, for judging the current accounting and default accounting max-thresholds and default accounting minimum threshold
Size;
Multiplying power adjusts the first module, if being more than default accounting max-thresholds for the current accounting, reduces current
The corresponding digital zoom multiplying power of preview image;
Multiplying power adjusts the second module, if being less than or equal to default accounting max-thresholds for the current accounting, and is more than
Equal to default accounting minimum threshold, then the corresponding digital zoom multiplying power of present preview image is kept;
Multiplying power adjusts the 3rd module, if being less than default accounting minimum threshold for the current accounting, increase is current
The corresponding digital zoom multiplying power of preview image.
The device of adaptive zoom provided in an embodiment of the present invention can be applied in foregoing corresponding method embodiment one, in detail
Feelings will not be repeated here referring to the description of above-described embodiment one.
Example IV
Fig. 4 shows the concrete structure block diagram of the device for the adaptive zoom that the embodiment of the present invention four is provided, it is adaptable to 3D
The mobile terminal of 3D scannings is completed in scanning system, the mobile terminal configuration has camera, for convenience of description, illustrate only
The part related to the embodiment of the present invention.In the present embodiment, this can the device of adaptive zoom include:Sweep start unit
41st, image acquisition unit 42, accounting acquiring unit 43, digital zoom unit 44, coordinate acquiring unit 45, coordinate transformation unit
46th, image storage unit 47, model generation unit 48 and coordinate map unit 49.
Wherein, sweep start unit 41, is connected with image acquisition unit 42, for receiving scan instruction, starts camera
Image preview is carried out to scanning object;
Image acquisition unit 42, is connected with sweep start unit 41, accounting acquiring unit 43, for obtaining scanning object
Present preview image;
Accounting acquiring unit 43, is connected with image acquisition unit 42, digital zoom unit 44, for being examined by dynamic outline
The boundary rectangle frame for obtaining Current Scan object is surveyed, current accounting of the boundary rectangle frame in present preview image is calculated;
Digital zoom unit 44, is connected with accounting acquiring unit 43, for according to the current accounting, adjusting camera pair
Boundary rectangle inframe scans the digital zoom multiplying power of object.
It is preferred that, the accounting acquiring unit 43 is specific:
Image normalizing module, for normalizing to present preview image in maximum field of view's angle picture of camera;
Profile acquisition module, for the preview image of the present preview image after normalization and previous frame to be carried out into difference,
Obtain the outline of scanning object;
External acquisition module, for the outline according to the scanning object, obtains the boundary rectangle frame of scanning object;
Accounting computing module, for the horizontal direction that calculates the boundary rectangle frame and current preview view accounting and hang down
Nogata to accounting, regard the maximum in the accounting of the accounting of the horizontal direction and vertical direction as current accounting.
It is preferred that, the digital zoom unit 44 is specific:
Accounting judge module, for judging the current accounting and default accounting max-thresholds and default accounting minimum threshold
Size;
Multiplying power adjusts the first module, if being more than default accounting max-thresholds for the current accounting, reduces current
The corresponding digital zoom multiplying power of preview image;
Multiplying power adjusts the second module, if being less than or equal to default accounting max-thresholds for the current accounting, and is more than
Equal to default accounting minimum threshold, then the corresponding digital zoom multiplying power of present preview image is kept;
Multiplying power adjusts the 3rd module, if being less than default accounting minimum threshold for the current accounting, increase is current
The corresponding digital zoom multiplying power of preview image.
It is preferred that, described device also includes:
Coordinate acquiring unit 45, for obtaining the laser strip region that laser is projected on scanning object, extracts laser strip area
Several 2D coordinates on the center line in domain;
Coordinate transformation unit 46, for being that several 3D under camera coordinate system are sat by several described 2D Coordinate Conversions
Mark and be stored as 3D point cloud;
Image storage unit 47, the image for storing boundary rectangle inframe is pre- using present preview image as previous frame
Look at image, after object rotation to be scanned, obtain next frame preview image and be used as present preview image;
Model generation unit 48, after 360 degree of scannings to be done, trigonometric ratio is carried out by the 3D point cloud, generation is swept
Retouch the 3D models of object.
It is preferred that, described device also includes:
Coordinate map unit, is connected with coordinate acquiring unit 45, coordinate transformation unit 46, for will obtain to obtain several 2D
Coordinate is mapped to corresponding 2D coordinates under maximum field of view angle.
The device of adaptive zoom provided in an embodiment of the present invention can be applied in foregoing corresponding method embodiment two, in detail
Feelings will not be repeated here referring to the description of above-described embodiment two.
Embodiment five
Fig. 5 embodiment of the present invention five provide mobile terminal concrete structure block diagram, for convenience of description, illustrate only with
The related part of the embodiment of the present invention.In the present embodiment, the mobile terminal include an at least processor 51, memory 52 and
Interface 53, at least a processor 51, memory 52 and the interface 53 are connected by bus;
The memory 52 stores computer program;
At least one described processor 51 performs the computer program that the memory 52 is stored so that the mobile terminal
The method for performing adaptive zoom in the 3D scannings described in above-described embodiment one or two.
Wherein, the invention also discloses a kind of storage medium, be stored with computer program, the meter on the storage medium
Calculation machine program realizes the method for adaptive zoom in 3D scannings described in embodiment one or two when being executed by processor the step of.
It is worth noting that, one of ordinary skill in the art will appreciate that:The step of realizing above method embodiment or portion
It can be completed step by step by the related hardware of programmed instruction, foregoing program can be stored in embodied on computer readable storage Jie
In matter, the program upon execution, performs the step of including above method embodiment, and foregoing storage medium includes:ROM、
RAM, magnetic disc or CD etc. are various can be with the medium of store program codes.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
Any modifications, equivalent substitutions and improvements made within refreshing and principle etc., should be included in the scope of the protection.
Claims (12)
1. a kind of method of adaptive zoom in 3D scannings, it is characterised in that methods described includes:
Scan instruction is received, starts camera and image preview is carried out to scanning object;
Obtain the present preview image of scanning object;
According to the preview image and present preview image of previous frame, detected by dynamic outline and obtain the external of Current Scan object
Rectangle frame, calculates current accounting of the boundary rectangle frame in present preview image;
According to the current accounting, digital zoom multiplying power of the adjustment camera to scanning object in external rectangle frame.
2. according to the method described in claim 1, it is characterised in that the preview image and current preview figure according to previous frame
Picture, the boundary rectangle frame for obtaining Current Scan object is detected by dynamic outline, calculates the boundary rectangle frame in current preview
Current accounting in image is specific:
In maximum field of view's angle picture that present preview image is normalized to camera;
The preview image of present preview image after normalization and previous frame is subjected to difference, the outline of scanning object is obtained;
According to the outline of the scanning object, the boundary rectangle frame of scanning object is obtained;
The accounting and the accounting of vertical direction of the horizontal direction of the boundary rectangle frame and current preview view are calculated, by the water
Square to accounting and vertical direction accounting in the maximum be used as current accounting.
3. according to the method described in claim 1, it is characterised in that described according to the current accounting, adjustment camera is external
The digital zoom multiplying power for connecing scanning object in rectangle frame is specific:
Judge the current accounting and the magnitude relationship of default accounting max-thresholds and default accounting minimum threshold;
If the current accounting is more than default accounting max-thresholds, the corresponding digital zoom times of present preview image is reduced
Rate;
If the current accounting is less than or equal to default accounting max-thresholds, and more than or equal to default accounting minimum threshold, then protects
Hold the corresponding digital zoom multiplying power of present preview image;
If the current accounting is less than default accounting minimum threshold, the corresponding digital zoom times of increase present preview image
Rate.
4. according to the method described in claim 1, the 3D scanning systems also include laser, it is characterised in that described according to institute
State after current accounting, digital zoom multiplying power of the adjustment camera to scanning object in external rectangle frame, methods described also includes:
The laser strip region that laser is projected on scanning object is obtained, several 2D on the center line in laser strip region is extracted and sits
Mark;
By several described 2D Coordinate Conversions is several 3D coordinates under camera coordinate system and are stored as 3D point cloud;
The image of boundary rectangle inframe is stored, using present preview image as previous frame preview image, object to be scanned rotates it
Afterwards, obtain next frame preview image and be used as present preview image;
After 360 degree of scannings to be done, the 3D point cloud is subjected to trigonometric ratio, the 3D models of generation scanning object.
5. method according to claim 4, it is characterised in that the laser strip that the acquisition laser is projected on scanning object
Region, is extracted on the center line in laser strip region after several 2D coordinates, methods described also includes:
To obtain several 2D coordinates are mapped to corresponding 2D coordinates under maximum field of view angle.
6. the device of adaptive zoom in a kind of 3D scannings, it is characterised in that described device includes:
Sweep start unit, for receiving scan instruction, starts camera and carries out image preview to scanning object;
Image acquisition unit, the present preview image for obtaining scanning object;
Accounting acquiring unit, for the preview image and present preview image according to previous frame, is detected by dynamic outline and obtained
The boundary rectangle frame of Current Scan object, calculates current accounting of the boundary rectangle frame in present preview image;
Digital zoom unit, for according to the current accounting, numeral of the adjustment camera to scanning object in external rectangle frame
Zoom ratio.
7. device according to claim 6, it is characterised in that the accounting acquiring unit is specific:
Image normalizing module, for normalizing to present preview image in maximum field of view's angle picture of camera;
Profile acquisition module, for the preview image of the present preview image after normalization and previous frame to be carried out into difference, is obtained
Scan the outline of object;
External acquisition module, for the outline according to the scanning object, obtains the boundary rectangle frame of scanning object;
Accounting computing module, accounting and Vertical Square for the horizontal direction that calculates the boundary rectangle frame and current preview view
To accounting, regard the maximum in the accounting of the accounting of the horizontal direction and vertical direction as current accounting.
8. device according to claim 6, it is characterised in that the digital zoom unit is specific:
Accounting judge module, for judging the big of the current accounting and default accounting max-thresholds and default accounting minimum threshold
It is small;
Multiplying power adjusts the first module, if being more than default accounting max-thresholds for the current accounting, reduces current preview
The corresponding digital zoom multiplying power of image;
Multiplying power adjusts the second module, if being less than or equal to default accounting max-thresholds for the current accounting, and is more than or equal to
Default accounting minimum threshold, then keep the corresponding digital zoom multiplying power of present preview image;
Multiplying power adjusts the 3rd module, if being less than default accounting minimum threshold for the current accounting, increases current preview
The corresponding digital zoom multiplying power of image.
9. device according to claim 6, the 3D scanning systems also include laser, it is characterised in that described device is also
Including:
Coordinate acquiring unit, for obtaining the laser strip region that laser is projected on scanning object, is extracted in laser strip region
Several 2D coordinates on heart line;
Coordinate transformation unit, for by several described 2D Coordinate Conversions is several 3D coordinates under camera coordinate system and deposit
Store up as 3D point cloud;
Image storage unit, the image for storing boundary rectangle inframe, using present preview image as previous frame preview image,
After object rotation to be scanned, obtain next frame preview image and be used as present preview image;
Model generation unit, after 360 degree of scannings to be done, trigonometric ratio, generation scanning object are carried out by the 3D point cloud
3D models.
10. device according to claim 9, it is characterised in that described device also includes:
Coordinate map unit, for will obtain several 2D coordinates are mapped to corresponding 2D coordinates under maximum field of view angle.
11. a kind of mobile terminal, it is characterised in that the mobile terminal includes at least a processor, memory and interface, described
At least a processor, memory and interface are connected by bus;
The memory storage computer program;
The computer program of memory storage described at least one described computing device so that the mobile terminal perform claim
It is required that the method for the adaptive zooms in scanning of the 3D described in any one of 1-5.
12. a kind of storage medium, it is characterised in that be stored with computer program on the storage medium, the computer program
The step of method of adaptive zoom in the 3D scannings described in claim any one of 1-5 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710568650.XA CN107277359A (en) | 2017-07-13 | 2017-07-13 | Method, device, mobile terminal and the storage medium of adaptive zoom in 3D scannings |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710568650.XA CN107277359A (en) | 2017-07-13 | 2017-07-13 | Method, device, mobile terminal and the storage medium of adaptive zoom in 3D scannings |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107277359A true CN107277359A (en) | 2017-10-20 |
Family
ID=60072970
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710568650.XA Pending CN107277359A (en) | 2017-07-13 | 2017-07-13 | Method, device, mobile terminal and the storage medium of adaptive zoom in 3D scannings |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107277359A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109141240A (en) * | 2018-09-05 | 2019-01-04 | 天目爱视(北京)科技有限公司 | A kind of measurement of adaptive 3 D and information acquisition device |
CN110006340A (en) * | 2019-03-26 | 2019-07-12 | 华为技术有限公司 | A kind of dimension of object measurement method and electronic equipment |
CN110456829A (en) * | 2019-08-07 | 2019-11-15 | 深圳市维海德技术股份有限公司 | Positioning and tracing method, device and computer readable storage medium |
CN111327800A (en) * | 2020-01-08 | 2020-06-23 | 深圳深知未来智能有限公司 | All-weather vehicle-mounted vision system and method suitable for complex illumination environment |
CN112291472A (en) * | 2020-10-28 | 2021-01-29 | Oppo广东移动通信有限公司 | Preview image processing method and device, storage medium and electronic equipment |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006323131A (en) * | 2005-05-19 | 2006-11-30 | Hitachi Kokusai Electric Inc | Television camera device |
CN101634796A (en) * | 2009-08-20 | 2010-01-27 | 上海合合信息科技发展有限公司 | Camera automatic zooming method and system |
CN102340628A (en) * | 2010-07-21 | 2012-02-01 | 鸿富锦精密工业(深圳)有限公司 | Camera and control method thereof |
CN102984454A (en) * | 2012-11-15 | 2013-03-20 | 广东欧珀移动通信有限公司 | System and method and mobile phone capable of automatically adjusting focal length of camera |
CN105157602A (en) * | 2015-07-13 | 2015-12-16 | 西北农林科技大学 | Remote three-dimensional scanning system and method based on machine vision |
CN105991930A (en) * | 2016-07-19 | 2016-10-05 | 广东欧珀移动通信有限公司 | Zoom processing method and device for dual cameras and mobile terminal |
CN106161941A (en) * | 2016-07-29 | 2016-11-23 | 深圳众思科技有限公司 | Dual camera chases after burnt method, device and terminal automatically |
CN106331463A (en) * | 2015-06-26 | 2017-01-11 | 小米科技有限责任公司 | Camera focal length amplifying method and device |
-
2017
- 2017-07-13 CN CN201710568650.XA patent/CN107277359A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006323131A (en) * | 2005-05-19 | 2006-11-30 | Hitachi Kokusai Electric Inc | Television camera device |
CN101634796A (en) * | 2009-08-20 | 2010-01-27 | 上海合合信息科技发展有限公司 | Camera automatic zooming method and system |
CN102340628A (en) * | 2010-07-21 | 2012-02-01 | 鸿富锦精密工业(深圳)有限公司 | Camera and control method thereof |
CN102984454A (en) * | 2012-11-15 | 2013-03-20 | 广东欧珀移动通信有限公司 | System and method and mobile phone capable of automatically adjusting focal length of camera |
CN106331463A (en) * | 2015-06-26 | 2017-01-11 | 小米科技有限责任公司 | Camera focal length amplifying method and device |
CN105157602A (en) * | 2015-07-13 | 2015-12-16 | 西北农林科技大学 | Remote three-dimensional scanning system and method based on machine vision |
CN105991930A (en) * | 2016-07-19 | 2016-10-05 | 广东欧珀移动通信有限公司 | Zoom processing method and device for dual cameras and mobile terminal |
CN106161941A (en) * | 2016-07-29 | 2016-11-23 | 深圳众思科技有限公司 | Dual camera chases after burnt method, device and terminal automatically |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109141240A (en) * | 2018-09-05 | 2019-01-04 | 天目爱视(北京)科技有限公司 | A kind of measurement of adaptive 3 D and information acquisition device |
CN109141240B (en) * | 2018-09-05 | 2019-10-18 | 天目爱视(北京)科技有限公司 | A kind of measurement of adaptive 3 D and information acquisition device |
CN110567370A (en) * | 2018-09-05 | 2019-12-13 | 天目爱视(北京)科技有限公司 | Variable-focus self-adaptive 3D information acquisition method |
CN110567370B (en) * | 2018-09-05 | 2021-11-16 | 天目爱视(北京)科技有限公司 | Variable-focus self-adaptive 3D information acquisition method |
CN110006340A (en) * | 2019-03-26 | 2019-07-12 | 华为技术有限公司 | A kind of dimension of object measurement method and electronic equipment |
WO2020192484A1 (en) * | 2019-03-26 | 2020-10-01 | 华为技术有限公司 | Object size measurement method and electronic device |
CN110456829A (en) * | 2019-08-07 | 2019-11-15 | 深圳市维海德技术股份有限公司 | Positioning and tracing method, device and computer readable storage medium |
CN110456829B (en) * | 2019-08-07 | 2022-12-13 | 深圳市维海德技术股份有限公司 | Positioning tracking method, device and computer readable storage medium |
CN111327800A (en) * | 2020-01-08 | 2020-06-23 | 深圳深知未来智能有限公司 | All-weather vehicle-mounted vision system and method suitable for complex illumination environment |
CN111327800B (en) * | 2020-01-08 | 2022-02-01 | 深圳深知未来智能有限公司 | All-weather vehicle-mounted vision system and method suitable for complex illumination environment |
CN112291472A (en) * | 2020-10-28 | 2021-01-29 | Oppo广东移动通信有限公司 | Preview image processing method and device, storage medium and electronic equipment |
CN112291472B (en) * | 2020-10-28 | 2021-09-28 | Oppo广东移动通信有限公司 | Preview image processing method and device, storage medium and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107277359A (en) | Method, device, mobile terminal and the storage medium of adaptive zoom in 3D scannings | |
RU2631765C1 (en) | Method and system of correcting perspective distortions in images occupying double-page spread | |
US20190385285A1 (en) | Image Processing Method and Device | |
TW201432621A (en) | Method and apparatus for image enhancement and edge verification using at least one additional image | |
US20130028519A1 (en) | Feature based image registration | |
CN108320270B (en) | Image correction method, device and storage medium | |
KR20100083498A (en) | Apparatus and method for inpainting image | |
CN109247068A (en) | Method and apparatus for rolling shutter compensation | |
CN105120172A (en) | Photographing method for front and rear cameras of mobile terminal and mobile terminal | |
WO2018176929A1 (en) | Image background blurring method and apparatus | |
US10586128B2 (en) | Configurable histogram-of-oriented gradients (HOG) processor | |
US20180114291A1 (en) | Image processing method and device as well as non-transitory computer-readable medium | |
CN111598777A (en) | Sky cloud image processing method, computer device and readable storage medium | |
CN111951193B (en) | Horizontal distortion correction method and horizontal distortion correction device for image | |
CN108898609A (en) | A kind of method for detecting image edge, detection device and computer storage medium | |
US8223229B2 (en) | Lens shading correction for autofocus and zoom lenses | |
CN113808033A (en) | Image document correction method, system, terminal and medium | |
CN102843479A (en) | File scanning method, file scanning device and portable electronic device | |
CN115983304A (en) | Two-dimensional code dynamic adjustment method and device, electronic equipment and storage medium | |
CN112614190B (en) | Method and device for projecting mapping | |
CN114820485A (en) | Method for measuring wave climbing height based on airborne image | |
CN112036342A (en) | Document snapshot method, device and computer storage medium | |
CN110580444B (en) | Human body detection method and device | |
CN115174879B (en) | Projection screen correction method, apparatus, computer device and storage medium | |
CN116485636B (en) | Point cloud elevation imaging method, system and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171020 |