Specific implementation mode
It is with reference to the accompanying drawings and embodiments, right in order to make the object, technical solution and advantage of the application be more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Image scanning output method provided by the present application, can be applied in application environment as shown in Figure 1.Wherein, more
A imaging sensor 102 is communicated with computer 104 by data-interface.Wherein, computer 104 can use independent service
The server cluster of device either multiple servers composition is realized.Imaging sensor 102 obtains wait for picture mosaic picture respectively, and will wait for
Picture mosaic picture is sent to computer, and computer adjusts other on the basis of wherein waiting for picture mosaic picture described in one, according to preset coordinate distance
The position for waiting for picture mosaic picture;According to preset coordinate distance to waiting for that the lap of picture mosaic picture is cut described in other, obtain
Spliced stitching image.
For example, a kind of image scanning output method, the method includes:It is obtained respectively by multiple images sensor multiple
Wait for picture mosaic picture, wherein wait for picture mosaic as least partially overlapped described in adjacent two;On the basis of waiting for picture mosaic picture described in one, according to
Preset coordinate distance adjusts and waits for the position of picture mosaic picture described in other;According to preset coordinate distance to waiting for the weight of picture mosaic picture described in other
Folded part is cut, and spliced stitching image is obtained.
In above-described embodiment, by multiple images sensor obtain respectively it is multiple wait for picture mosaic picture, picture mosaic picture will be waited for into line position
Adjustment is set, will wait for that the lap of picture mosaic picture cuts removal, waits for that picture mosaic picture splices by multiple, realizes the spelling for waiting for picture mosaic picture
It connects, avoids waiting for there is acquisition gap between picture mosaic picture, effectively image can be avoided to lack, image mosaic is avoided to repeat so that spelled
Map interlinking picture is more complete.
In one embodiment, as shown in Fig. 2, providing a kind of image scanning output method, it is applied to Fig. 1 in this way
In terminal for illustrate, include the following steps:
Step 210, it is obtained respectively by multiple images sensor and multiple waits for picture mosaic picture, wherein waited for described in adjacent two
Picture mosaic is as least partially overlapped.
For example, being acquired respectively by multiple images sensor, acquisition is multiple to wait for picture mosaic picture, for example, being sensed by multiple images
Device acquire respectively it is multiple wait for picture mosaic picture, obtain multiple binary data for waiting for picture mosaic picture.
In the present embodiment, imaging sensor is contact-type image sensor (CIS).Specifically, each imaging sensor is used
One wait for picture mosaic picture in obtaining, then multiple images sensor obtain it is multiple wait for picture mosaic picture, it is multiple to wait for that picture mosaic picture corresponds to same object respectively
Different zones on material, each imaging sensor are used to obtain the image on the region on the material, and two adjacent figures
As the region on the corresponding material of sensor partly overlaps, in this way, the figure for the material that two adjacent imaging sensors are got
As least partially overlapped.
Specifically, in the present embodiment, multiple images sensor is arranged at multiple lines and multiple rows, with the multiple images sensor of a line
It is mutually aligned, i.e., is aligned in a straight line with the multiple images sensor of a line, adjacent with a line two imaging sensors obtain
The image of the material taken is least partially overlapped, and the imaging sensor of adjacent two row is staggered one by one, also just says, the image sensing of a row
The imaging sensor of device and another row is staggered one by one respectively, and each imaging sensor of a row is aligned two images biography of another row
Gap between sensor.
For example, the multiple wait for that picture mosaic picture is arranged at multiple lines and multiple rows, multiple with a line wait for that picture mosaic picture is mutually aligned, same
Adjacent two that go wait for picture mosaic as least partially overlapped, and the imaging sensors of adjacent two row are staggered one by one, i.e., one each of row waits for
Spell the gap between two imaging sensors of another row of image alignment.Wait for that picture mosaic picture fully covers in such manner, it is possible to enable
The surface of material, the missing or display for avoiding material from being imaged be not complete.
It is noted that the overlapping described in this step refers to the overlapping of the content corresponding to two images.
In other embodiments, imaging sensor can also use CCD (Charge-coupled Device, Charged Couple
Element) or CMOS (Complementary Metal Oxide Semiconductor, complementary metal oxide semiconductor) is in fact
It is existing, not burdensome description in the present embodiment.
Step 230, on the basis of waiting for picture mosaic picture described in one, according to preset coordinate distance adjust other described in wait for picture mosaic as
Position.
Specifically, in the present embodiment, multiple positions for waiting for one in picture mosaic picture are fixed so that other wait for picture mosaic as
Position is adjusted, and then realizes the alignment to image so that the part of two adjacent overlappings for waiting for picture mosaic picture can be in place
Set overlapping.
For example, waiting for that picture mosaic picture includes that benchmark waits for that picture mosaic picture and image to be adjusted, benchmark wait for that the position of picture mosaic picture is fixed, wait adjusting
On the basis of one benchmark of whole image waits for picture mosaic picture, position adjustment is carried out according to preset coordinate distance, i.e. benchmark waits for picture mosaic as corresponding
What is be fixed in position waits for picture mosaic picture, and to be other need image to be adjusted that position adjusts waits for picture mosaic picture.Specifically, the default seat
Subject distance is the adjustment distance of image to be adjusted, and preset coordinate distance includes original coordinates, traversing coordinate and vertical shift coordinate, is somebody's turn to do
Original coordinates include original abscissa and initial ordinate, which is that image to be adjusted waits for that picture mosaic picture exists relative to benchmark
Offset distance on horizontal axis, the vertical shift coordinate are that image to be adjusted waits for the offset distance of picture mosaic picture on longitudinal axis relative to benchmark,
It is noted that the traversing coordinate and vertical shift coordinate are calculated according to the distance between imaging sensor.
For example, on the basis of benchmark waits for picture mosaic as corresponding imaging sensor, preset coordinate distance is obtained, for example, with base
On the basis of standard waits for picture mosaic as corresponding imaging sensor, the lateral distance between picture mosaic picture is waited for according to each image to be adjusted and benchmark
And fore-and-aft distance, obtain the preset coordinate distance of each image to be adjusted.For example, according to the distance between each imaging sensor, obtain
Take the preset coordinate distance for respectively waiting for picture mosaic picture.It should be understood that since the benchmark of each image relative displacement to be adjusted is same
A benchmark waits for picture mosaic picture, and therefore, the preset coordinate of each image to be adjusted distance is different, the traversing coordinate of each image to be adjusted and vertical
It is different to move coordinate, and traversing coordinate and vertical shift coordinate wait for the increase of the distance between picture mosaic picture with benchmark with image to be adjusted and increase
Greatly.
For example, acquiring multiple test images by imaging sensor, each test image is parsed, is obtained between each test image
Lap width, according to the width of the lap between each test image obtain preset coordinate distance.
Step 250, spliced to waiting for that the lap of picture mosaic picture is cut described in other according to preset coordinate distance
Stitching image afterwards.
In this step, the lap for treating picture mosaic picture is cut, and is removed in two laps for waiting for picture mosaic picture
One of them, retains another in two laps for waiting for picture mosaic picture.
Specifically, after treating picture mosaic picture and carrying out displacement, respectively wait for that the lap of picture mosaic picture is overlapped in position, therefore,
It treats picture mosaic picture to be cut, one in lap is cut, retain another in lap.In this way so that
It respectively waits for that the gap between picture mosaic picture is eliminated, and avoids the overlapping waited between picture mosaic picture, so that multiple wait for that picture mosaic picture is spelled
It is connected in stitching image.
In one embodiment, described on the basis of waiting for picture mosaic picture described in one, other institutes are adjusted according to preset coordinate distance
Further include before the step of stating the position for waiting for picture mosaic picture:Using peg method or triplet to it is each it is described wait for picture mosaic picture into
Row image rectification.
Specifically, it is corrected by treating picture mosaic picture, eliminates the nonlinear response effect of imaging sensor imaging unit.
It should be understood that the color for the image that imaging sensor acquisition is got has distortion, imaging sensor acquisition is got
Image often has differences between the color of true material.In the present embodiment, by using peg method or three point schools
Execute to it is each it is described wait for that picture mosaic picture carries out image rectification, reduce the color of image that imaging sensor acquisition is got and material be real
Difference between the color of border reduces color error.
For example, using peg method to it is each it is described wait for picture mosaic picture carry out image rectification, for example, it is described use two point correction
Method to it is each it is described wait for picture mosaic picture carry out image rectification the step of include:Black white image is obtained by imaging sensor, described in acquisition
The pixel of the binary data of black white image, the pixel average and white pixel that obtain the black picture element of the black white image is flat
Mean value, according to the pixel average of the pixel average of the black picture element of the black white image and white pixel to each figure to be spliced
As being corrected, wherein according to the pixel average of the pixel average of black picture element and white pixel to each image to be spliced
Corrected updating formula is:
Wherein, SIt is originalFor the pixel value of image to be spliced, BBlack average valueFor the pixel average of the black picture element of black white image,
WWhite average valueFor the pixel average of the white pixel of black white image, VAs a resultFor the pixel value of the image to be spliced after correction.
Specifically, binary number representation can be used in the value of each pixel in image, and ranging from the 0~255 of each pixel value,
In the present embodiment, black white image is that half is completely black, the other half is complete white image, and the black white image that imaging sensor obtains
It is completely black be not necessarily 0, complete white also not necessarily 255, the black and white in the full black and full white and actual color of black white image is deposited
In error, therefore, passing through updating formula so that the pixel value of image to be spliced and the pixel value approach of actual color are consistent, or
Person is identical, reduces the error between the pixel value of image to be spliced and the pixel value of actual color, eliminates imaging sensor imaging
The nonlinear response effect of unit so that the color of image to be spliced is truer.
In one embodiment, it is described according to preset coordinate distance to waiting for that the lap of picture mosaic picture is cut out described in other
Further include after the step of cutting, obtaining spliced stitching image:Noise reduction process is filtered to the stitching image.
In the present embodiment, by being filtered to stitching image and noise reduction process, it can effectively inhibit the noise of image, just
In subsequent image procossing.
For example, being filtered noise reduction process to the stitching image using medium filtering mode.Specifically, the present embodiment
In, using medium filtering, medium filtering is a kind of can effectively inhibit at the nonlinear properties of noise based on sequencing statistical theory
Reason technology, basic principle is will be in each point value in a field of the value of any in the digital picture or Serial No. point
Value replaces, the actual value for making the pixel value of surrounding close, to eliminate isolated noise spot.Specifically, using preset structure
The pixel of stitching image is ranked up by two-dimentional sleiding form according to the size of pixel value, generates monotone increasing or monotonic decreasing
It is 2-D data sequence.
Formula is exported using two dimension median filter, the pixel value of stitching image is filtered:
Two dimension median filter exports formula:G (x, y)=med { f (x-k, y-l), (k, l ∈ W) }
Wherein, f (x, y) is the pixel value of original image, and g (x, y) is the pixel value of image after processing, and W is two dimension pattern plate,
The region usually 2*2,3*3 can also be different shape, such as linear, round, cross, circular ring shape etc..
In one embodiment, further include after described the step of being filtered noise reduction process to the stitching image:It obtains
Image interpolation is taken, based on described image interpolation to the stitching image into row threshold division.
In the present embodiment, by stitching image into row threshold division so that the foreground image and Background of stitching image
As segmentation.Specifically, foreground image is the image of material, and background image is the image of the background of material, in the present embodiment, is passed through
Foreground image and background image are divided so that the image of material is more accurate, and then can accurately obtain the profile of material.Example
Such as, image interpolation is obtained, foreground image is obtained into row threshold division to the stitching image based on described image interpolation.
Specifically, when to stitching image into row threshold division, additional loss details is had, for stitching image energy
It is enough to reply the details lost, in the present embodiment, using image interpolation can recovered part details, can be obtained by bicubic interpolation
To a continuous interpolating function, its first-order partial derivative is continuous, and cross derivative everywhere continuous.As shown in figure 8, P points are just
It is that target image B corresponds to the position in source images at (X, Y), the coordinate position of P will appear fractional part, thus, it is supposed that P
Coordinate be P (x+u, y+v), wherein x, y indicate that integer part, u, v indicate fractional part respectively respectively.So we can
To obtain the position of nearest 16 pixels, a (i, j) (i, j=0,1,2,3) is used to indicate herein.The purpose of bi-cubic interpolation
Exactly by finding a kind of relationship, this 16 pixels, can be obtained impact factor for pixel value at P and found out by coefficient in other words
Come, to obtain the pixel value of target image corresponding points according to this impact factor, achievees the purpose that image scaling.
BiCubic basic function forms are as follows:
Carrying out image threshold segmentation:To the stitching image after filtering noise reduction into row threshold division, in the present embodiment, using global threshold
Value pattern divide, calculate threshold value using otsu (maximum variance between clusters) methods to filtering noise reduction after stitching image at
Reason obtains binary map.Specifically, for piece image, if when the segmentation threshold of foreground and background is t, foreground point accounts for image
Ratio is w0, and mean value u0, it is w1, mean value u1 that background dot, which accounts for image scaled,.Then the mean value of whole image is u=w0*u0+
w1*u1.Establish object function g (t)=w0* (u0-u) ^2+w1* (u1-u) ^2, g (t) be exactly when segmentation threshold be t when class between
Variance expression formula.OTSU algorithms make g (t) obtain global maximum, and when g (t) is maximum, corresponding t is known as best threshold
Value.Specific algorithm is g=w0* (u0-u) ^2+w1* (u1-u) ^2=w0*w1* (u1-u0) ^2, is calculated by substituting into above formula
Optimal threshold.
In one embodiment, it is described according to preset coordinate distance to waiting for that the lap of picture mosaic picture is cut out described in other
Further include after the step of cutting, obtaining spliced stitching image:Vectorized process is carried out to the stitching image, described in acquisition
The vector outline of stitching image.
For example, carrying out vectorized process to the stitching image using Potrace algorithms, the arrow of the stitching image is obtained
Measure profile.For example, carrying out vectorized process to the stitching image using Potrace algorithms, the arrow of the stitching image is obtained
Profile is measured, vector point set is obtained.For example, the step of carrying out vectorized process to the stitching image using Potrace algorithms packet
It includes:1) path decomposing;2) impurity point is removed;3) polygon is handled;4) polygon is to vector outline.For example, to the foreground image
Vectorized process is carried out, the vector outline of the foreground image is obtained.
In the present embodiment, vectorized process is carried out to the stitching image by Potrace algorithms so that foreground image
Profile forms vector point set, and specifically, vector point set is the set of the point of the profile of foreground image, which includes multiple
Point, each point line of vector point set form the profile of scape image.
In one embodiment,:Vectorized process is carried out to the stitching image, obtains the vector wheel of the stitching image
Further include after wide step:The vector outline is exported.
For example, the vector point set is exported, for example, being plotting file by vector outline output, for example, will be described
The output of vector point set is plotting file.The plotting file is used to provide big plate foundation for the big trigger of laser.
For example, optimizing screening to the profile point set of output, profile point set quality is improved, and export as final result
For DXF files, DXF files are used as the input foundation that post laser sheeting machine beats version so that laser sheeting machine is according to the profile of DXF
The position of point set carries out material to beat version, and version precision is beaten to improve.
In one embodiment, as shown in figure 3, providing a kind of image scanning output device, including:Wait for that picture mosaic picture obtains
Module 310, position adjusting type modules 330 and concatenation module 350, wherein:
Image collection module 310 to be spelled, which is used to obtain respectively by multiple images sensor, multiple waits for picture mosaic picture, wherein phase
Wait for picture mosaic as least partially overlapped described in adjacent two.
Position adjusting type modules 330 are used on the basis of waiting for picture mosaic picture described in one, other institutes are adjusted according to preset coordinate distance
State the position for waiting for picture mosaic picture.
Concatenation module 350 is used for according to preset coordinate distance to waiting for that the lap of picture mosaic picture is cut described in other,
Obtain spliced stitching image.
In one embodiment, image scanning output device further includes:Correction module, for using peg method or three
Point calibration method to it is each it is described wait for picture mosaic picture carry out image rectification.
In one embodiment, image scanning output device further includes:Noise reduction module is filtered, for the stitching image
It is filtered noise reduction process.
In one embodiment, image scanning output device further includes:
Threshold value separating modules carry out threshold value based on described image interpolation for obtaining image interpolation to the stitching image
Segmentation.
In one embodiment, image scanning output device further includes:
Vector outline acquisition module obtains the stitching image for carrying out vectorized process to the stitching image
Vector outline.
Specific about image scanning output device limits the limit that may refer to above for image scanning output method
Fixed, details are not described herein.Modules in above-mentioned image scanning output device can fully or partially through software, hardware and its
It combines to realize.Above-mentioned each module can be embedded in or in the form of hardware independently of in the processor in computer equipment, can also
It is stored in a software form in the memory in computer equipment, in order to which processor calls the above modules of execution corresponding
Operation.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction
Composition can be as shown in Figure 4.The computer equipment include the processor connected by system bus, memory, network interface and
Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment
Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data
Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating
The database of machine equipment is for storing image scanning output data.The data-interface of the computer equipment is used for and external image
Sensor connects and realizes communication, for example, the data-interface is USB (Universal Serial Bus, universal serial bus)
Interface, for example, the data-interface is network interface, for example, the data-interface is COM (cluster communication
Port, COM) interface.To realize a kind of image scanning output method when the computer program is executed by processor.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structure
Figure can be as shown in Figure 5.The computer equipment includes the processor connected by system bus, memory, network interface, display
Screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment is deposited
Reservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer journey
Sequence.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating
The network interface of machine equipment is used to communicate by network connection with external equipment.When the computer program is executed by processor with
Realize a kind of image scanning output method.The display screen of the computer equipment can be that liquid crystal display or electric ink are shown
Screen, the imaging sensor of the computer equipment is for acquiring image, for example, the imaging sensor is CIS, for example, the image passes
Sensor is CCD, for example, for example, the imaging sensor is CMOS.
It will be understood by those skilled in the art that structure shown in Fig. 5, is only tied with the relevant part of application scheme
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment
May include either combining certain components than more or fewer components as shown in the figure or being arranged with different components.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory
And the computer program that can be run on a processor, processor realize following steps when executing computer program:
It is obtained respectively by multiple images sensor and multiple waits for picture mosaic picture, wherein wait for picture mosaic picture extremely described in adjacent two
Small part is overlapped;On the basis of waiting for picture mosaic picture described in one, is adjusted according to preset coordinate distance and wait for the position of picture mosaic picture described in other;
According to preset coordinate distance to waiting for that the lap of picture mosaic picture is cut described in other, spliced stitching image is obtained.
In one embodiment, following steps are also realized when processor executes computer program:
Described wait for that picture mosaic picture carries out image rectification to each using peg method or triplet.
In one embodiment, following steps are also realized when processor executes computer program:
Noise reduction process is filtered to the stitching image.
In one embodiment, following steps are also realized when processor executes computer program:
Image interpolation is obtained, based on described image interpolation to the stitching image into row threshold division.
In one embodiment, following steps are also realized when processor executes computer program:
Vectorized process is carried out to the stitching image, obtains the vector outline of the stitching image.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program realizes following steps when being executed by processor:
It is obtained respectively by multiple images sensor and multiple waits for picture mosaic picture, wherein wait for picture mosaic picture extremely described in adjacent two
Small part is overlapped;On the basis of waiting for picture mosaic picture described in one, is adjusted according to preset coordinate distance and wait for the position of picture mosaic picture described in other;
According to preset coordinate distance to waiting for that the lap of picture mosaic picture is cut described in other, spliced stitching image is obtained.
In one embodiment, following steps are also realized when computer program is executed by processor:
Described wait for that picture mosaic picture carries out image rectification to each using peg method or triplet.
In one embodiment, following steps are also realized when computer program is executed by processor:
Noise reduction process is filtered to the stitching image.
In one embodiment, following steps are also realized when computer program is executed by processor:
Image interpolation is obtained, based on described image interpolation to the stitching image into row threshold division.
In one embodiment, following steps are also realized when computer program is executed by processor:
Vectorized process is carried out to the stitching image, obtains the vector outline of the stitching image.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein,
Any reference to memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Here is specific embodiment:
In the present embodiment, Image Acquisition end use 6 CIS sensors, 6 CIS sensors include CIS_1, CIS_2,
CIS_3, CIS_4, CIS_5 and CIS_6,6 CIS sensors are arranged in " it " word arrangement, i.e. 6 CIS sensors are arranged in two rows
It arranges, often 3 CIS sensors of row, and 3 CIS sensors of a line and 3 CIS sensors of other a line mutually stagger, generally
For, there are mainly three types of breadths for single CIS sensing heads:A4、A6、A8.In the present embodiment, using A4 breadths, A4 breadths are horizontal
To width about 2000mm, therefore, for 6 expansible scanning breadths that are spliced to 1000mm, can meet wide cut material applies need
It asks.The setting structure of its 6 CIS sensors is as shown in Figure 6.
Specifically, it is formed in " it " word arrangement by 6 CIS sensors due to Image Acquisition end, thus two adjacent CIS
Between necessarily have an overlapping and dislocation, adjacent two CIS sensors, the areas imaging of CIS_1 and CIS_2 as shown in fig. 7, its
Dash area is lap in middle figure.If the every CIS image sequences scanned are simply thus combined into one
Wide format images, two channels CIS that final image necessarily abuts present and misplace alternatively up and down, and have overlay region in seam crossing
Domain.Therefore, it is necessary to make splicing to image.
Here is specific image scanning processing procedure:
Step 1, Image Acquisition:Image original binary data is obtained by acquiring library, because data dose-effect is big, is considered
It is not high enough (processing time and CIS sweep times of data volume to USB transmission data time) to industrial computer performance, it carries out as possible
It is time-optimized, so selection is handled using parallel mode, (there is storage chip in equipment) after obtaining a certain amount of data volume, hands over
(correction -) splicing is handled to next workflow) it arrives and terminates.
Step 2, image rectification:Image is corrected using 2 points or triplet, to eliminate imaging sensor
The nonlinear response effect of CIS imaging units.It is first black with current CIS scannings one and half white half specifically by taking two-point method as an example
Then image data is obtained in vain with black column average value, is preserved after taking value, be then above for often capable number in application
It is corrected processing according to whole image data come what is spliced, is not necessarily required to.Formula:
Step 3, image mosaic:From the foregoing, it can be understood that the figure for the broad width scanning component acquisition being spliced by CIS " it " word
As dislocation and horizontally overlapping characteristic up and down is presented, thus need using the mapping relations between physical space coordinates and pixel coordinate,
Horizontally overlapping image restoring will be misplaced up and down into dislocation-free and overlapping image, which is image mosaic, belongs to wide cut CIS and sweeps
It is peculiar to retouch institute.Specific practice is, first acquires one 6 image data with CIS whole pixels, can according to this dislocation and again
Folded image data obtains the x of every CIS, y, top, and left coordinate spacing then can basis when scanning next time
X, y, top, left coordinate spacing to carry out pointer offset realization splicing function to image data buffer.
Step 4, image filtering:It is filtered to collecting original image, to inhibit noise, consequently facilitating subsequent figure
As processing.Medium filtering is used herein, it is a kind of non-linear letter that can effectively inhibit noise based on sequencing statistical theory
Number treatment technology, basic principle is each point value in a field the value of any in the digital picture or Serial No. point
Mesophyticum replace, the actual value for making the pixel value of surrounding close, to eliminate isolated noise spot.Certain structure of method
Pixel in plate is ranked up by two-dimentional sleiding form according to the size of pixel value, and it is two dimension to generate monotone increasing (or decline)
Data sequence.Two dimension median filter output is g (x, y)=med { f (x-k, y-l), (k, l ∈ W) }, wherein f (x, y), g (x,
Y) image after being respectively original image and handling.W is two dimension pattern plate, usually 2*2, and the regions 3*3 can also be different shape
Shape, such as linear, round, cross, circular ring shape etc..
Step 5, image interpolation:When next step uses image segmentation, additional loss details is had, image is used
Interpolation can recovered part details, a continuous interpolating function, its first-order partial derivative can be obtained by bicubic interpolation
Continuously, and cross derivative everywhere continuous.P points as shown in Figure 5 are exactly that target image B corresponds at (X, Y) in source images
The coordinate position of position, P will appear fractional part, it is assumed that the coordinate of P is P (x+u, y+v), and wherein x, y indicate integer portion respectively
Point, u, v indicates fractional part respectively.So we can be obtained by the position of nearest 16 pixels as shown in the figure, herein
It is indicated with a (i, j) (i, j=0,1,2,3).The purpose of bi-cubic interpolation is exactly the coefficient in other words by finding a kind of relationship,
This 16 pixels can be obtained impact factor for pixel value at P to find out, to obtain target according to this impact factor
The pixel value of image corresponding points, achievees the purpose that image scaling.BiCubic basic function forms are as follows:
Carrying out image threshold segmentation:To a upper link output image into row threshold division, the method for being used herein is global threshold
Value pattern is divided, and calculates threshold value and is handled using otsu methods, obtains a binary map.For piece image, if when foreground with
When the segmentation threshold of background is t, it is w0, mean value u0 that foreground point, which accounts for image scaled, and it is w1 that background dot, which accounts for image scaled, and mean value is
u1.Then the mean value of whole image is u=w0*u0+w1*u1.Establish object function g (t)=w0* (u0-u) ^2+w1* (u1-u) ^
2, g (t) is exactly the inter-class variance expression formula when segmentation threshold is t.OTSU algorithms make g (t) obtain global maximum, work as g
(t) t corresponding when being maximum is known as optimal threshold.Algorithm idea:G=w0* (u0-u) ^2+w1* (u1-u) ^2=w0*w1*
(u1-u0) ^2 (substituting into * formulas can obtain)
Step 6, bitmap turn vector quantization:Contour extraction is carried out to the image of upper link output, to obtain the wheel of material
Wide point set.
For example, step 6 includes:1) Contour extraction is carried out to the image of upper link output, then makees path decomposing, 2)
Remove impurity point, 3) it carry out polygon processing, 4) is converted into vector outline from polygon, obtains the profile point set of material.For example, step
Rapid six are realized using Potrace algorithms.
It is realized it is noted that the prior art can be used in above-mentioned Potrace algorithms, not burdensome description in the present embodiment.
Step 7, the optimization of profile point set:Screening is optimized to the profile point set of step 6 section output, improves profile point set
Quality, and mimeograph documents are output to as final structure, such as mimeograph documents are DXF files, are beaten as post laser sheeting machine
The input of version.
Each technical characteristic of above example can be combined arbitrarily, to keep description succinct, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield is all considered to be the range of this specification record.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, under the premise of not departing from the application design, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the protection domain of the application patent should be determined by the appended claims.