CN103279235B - Method and system for positioning touch point - Google Patents

Method and system for positioning touch point Download PDF

Info

Publication number
CN103279235B
CN103279235B CN201310205618.7A CN201310205618A CN103279235B CN 103279235 B CN103279235 B CN 103279235B CN 201310205618 A CN201310205618 A CN 201310205618A CN 103279235 B CN103279235 B CN 103279235B
Authority
CN
China
Prior art keywords
edge
marginal point
point
touch area
marginal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310205618.7A
Other languages
Chinese (zh)
Other versions
CN103279235A (en
Inventor
黄斐铨
黄安麒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shirui Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shirui Electronics Co Ltd
Priority to CN201310205618.7A priority Critical patent/CN103279235B/en
Publication of CN103279235A publication Critical patent/CN103279235A/en
Application granted granted Critical
Publication of CN103279235B publication Critical patent/CN103279235B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Position Input By Displaying (AREA)

Abstract

A method of touch point location comprising the steps of: storing an effective touch area of a collected image based on a pre-stored effective touch area, and detecting a touch point position from the effective touch area of the image, wherein the pre-stored effective touch area is determined by the following steps: carrying out edge detection on the gray scale of the initial image to determine a first edge; when the transverse length of the effective touch area is greater than the longitudinal length, deleting edge points with the same transverse coordinates and the number of the edge points greater than two, determining a second edge according to the deleted edge, performing fracture compensation on the second edge according to the first edge, stretching the compensated second edge in the extending direction, and determining the pre-stored effective touch area; similar processing occurs when the lateral length of the active touch area is less than the longitudinal length. The invention provides a corresponding system. The invention saves the memory when storing the image. Efficiency and accuracy are improved when detecting touch point locations.

Description

The method and system of location, touch point
Technical field
The present invention relates to optical imaging touch screen technical field, particularly relate to the method for location, touch point and be System.
Background technology
In optical imaging touch screen system, it is respectively provided with camera head in the upper left corner of touch screen and the upper right corner. Can be to be respectively with light supply apparatus above or below photographic head, on the left of touch screen, right side and downside each Being provided with reflex reflector, reflex reflector can be retroreflecting material apparatus;Can also be on the left of touch screen, Right side and downside are respectively provided with light-emitting device.When having light source to penetrate near camera head, through reflex reflector, will Light backtracking, then the light that left and right light-emitting device emits can cover touch screen, and all can return to Camera head.If there being touching object to enter touch area, then can block the light being partially into photographic head, In the photo of photographic head shooting, present in white bright wisp region, black region is position, touch point.White is bright Bar region is reflectorized material or luminous source region, is properly termed as effective touch area.System needs to pass through The image of acquisition camera, then stores entire image, and finds out position, touch point from entire image.Pass In system method, storing view picture figure, image data amount is big, and the transmission time is long, takies more hardware Resource.Such as, if photographic head pixel resolution is 480*640, the data volume of 1 pixel is 1 byte, Then need to create the image buffer of 300K in internal memory.For embedded system scheme, the biggest Memory source demand is luxurious.Looking for position, touch point from view picture figure, efficiency is low, and accuracy rate is low.
Summary of the invention
Based on this, it is necessary to during for storage, temporary resource is big, look for position, touch point is that efficiency is low, accuracy rate Low problem, it is provided that the method and system of location, a kind of touch point.
A kind of method of location, touch point, including step:
Effective touch area based on effective touch area image to gathering that prestores stores, from described figure Detected touch point position in effective touch area of picture, wherein, described in prestore effective touch area by following Step determines:
The gray scale of initial pictures is carried out rim detection, determines the first edge;
When the lateral length of effective touch area is more than longitudinal length, deletion abscissa is identical and marginal point individual The number marginal point more than two, determines the second edge, according to described first edge to institute according to the edge after deleting State the second edge and carry out the compensation of disconnected place, the second edge after compensating is carried out bearing of trend stretching, determine described Prestore effective touch area;
When the lateral length of effective touch area is less than longitudinal length, deletion vertical coordinate is identical and marginal point individual The number marginal point more than two, determines the 3rd edge according to the edge after deleting;According to described first edge to institute State the 3rd edge and carry out the compensation of disconnected place, the 3rd edge after compensating is carried out bearing of trend stretching, determine described Prestore effective touch area.
A kind of touch point alignment system, including:
Effectively touch area memory module, for based on the effective of effective touch area image to gathering that prestore Touch area stores;
Detected touch point position module, for the described image from the storage of described effective touch area memory module Effective touch area in detected touch point position;
Effective touch area that prestores determines module, for the gray scale of initial pictures is carried out rim detection, determines First edge;
When the lateral length of effective touch area is more than longitudinal length, deletion abscissa is identical and marginal point individual The number marginal point more than two, determines the second edge, according to described first edge to institute according to the edge after deleting State the second edge and carry out the compensation of disconnected place, the second edge after compensating is carried out bearing of trend stretching, determine described Prestore effective touch area;
When the lateral length of effective touch area is less than longitudinal length, deletion vertical coordinate is identical and marginal point individual The number marginal point more than two, determines the 3rd edge according to the edge after deleting;According to described first edge to institute State the 3rd edge and carry out the compensation of disconnected place, the 3rd edge after compensating is carried out bearing of trend stretching, determine described Prestore effective touch area.
The method and system of location, above-mentioned touch point, by identifying effective touch recognition scope, abandons useless Image information, thus find out the effective touch area prestored.When storing image, only storage is pre- Effective touch area that effective touch area of depositing is corresponding, thus save internal memory.In detected touch point position Time, detect from effective touch area, improve efficiency and accuracy.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the embodiment of the method one of inventive touch point location;
Fig. 2 is the schematic flow sheet determining effective touch area that prestores in the embodiment of the present invention one;
Fig. 3 is the edge graph after rim detection of the present invention;
Fig. 4 is the schematic diagram that feature of present invention filters;
Fig. 5 is the schematic flow sheet determining effective touch area that prestores in the embodiment of the present invention two;
Fig. 6 is the embodiment of the present invention 2 second edge graph;
Fig. 7 is the structural representation of inventive touch point positioning system embodiment.
Detailed description of the invention
Each embodiment below for the method and system of inventive touch point location is described in detail.
Each embodiment first against the method for location, touch point is described.
Embodiment one
See Fig. 1, for the schematic flow sheet of the embodiment of the method one of inventive touch point location, including step:
Step S101: effective touch area based on effective touch area image to gathering that prestores stores;
Step S102: detected touch point position from effective touch area of image.
Wherein, see Fig. 2, for the embodiment of the present invention one determines the schematic flow sheet of effective touch area that prestores, Including step:
Step S201: the gray scale of initial pictures is carried out rim detection, determines the first edge;
Step S202: when the lateral length of effective touch area is more than longitudinal length, delete abscissa identical And the marginal point that marginal point number is more than two, determine the second edge according to the edge after deleting,
Step S203: according to the first edge, the second edge is carried out disconnected place and compensate, to the second edge after compensating Carry out bearing of trend stretching, determine effective touch area that prestores;
Step S204: when the lateral length of effective touch area is less than longitudinal length, delete vertical coordinate identical And the marginal point that marginal point number is more than two, determine the 3rd edge according to the edge after deleting;
Step S205: according to the first edge, the 3rd edge is carried out disconnected place and compensate, to the 3rd edge after compensating Carry out bearing of trend stretching, determine effective touch area that prestores.
In traditional method, because camera head is mounted in the left and right sides of touch screen, system needs by gathering Then two pictures are stored by the image of left and right camera head, and obtain the touch in two width figures respectively Point position, determines position on the touchscreen, touch point according to the position of touch point in two width images.And this reality Execute example to focus on introducing the position, touch point how determined on every figure.This programme is by removing unnecessary limit Edge, and the edge after removing is compensated, obtain effective touch area that prestores of image, based on prestoring Effective touch area of image is stored and detects, such that it is able to obtain in this image by effect touch area Position, touch point.Of course, it is possible to use this programme method to ask two width figure each positions, touch point respectively, thus Obtain position on the touchscreen, touch point.Concrete how to find out from effective touch area position, touch point with The method finding out touch point in prior art from whole figure is identical, simply finds range shorter, specifically side Method does not repeats them here.
Owing to the angle of camera head shooting photo is different, it is possible to obtain the photograph being probably laterally or longitudinally Sheet, and existing apparatus is can identify that photo is horizontal or longitudinal direction, so following with horizontal photo (i.e. effectively the lateral length of touch area is more than longitudinal length) is to determining that effective touch area that prestores is carried out in detail Thin description.
First, the gray scale of initial pictures being carried out rim detection, edge detection method can use prior art In edge detection method, this programme is as a example by canny edge detection algorithm.The general process of canny algorithm is
1. use Gaussian filter noise reduction;
2. differential processes and obtains gradient magnitude and direction;
3. pair gradient carries out non-maxima suppression (non local maximum sets to 0);
4. gradient is filtered by dual threshold;
5. pair edge filtered out is attached.
It is of course also possible to use other edge detection methods, do not repeat them here.
As it is shown on figure 3, be the edge graph after rim detection of the present invention.White lines be process after the limit that obtains Edge.Delete the marginal point that abscissa is identical and marginal point number is more than two, the most same vertical line only exists a pair The situation of marginal point pair stays, being filtered more than a pair, determines the second edge according to the edge after deleting.
According to the first edge, the second edge being carried out disconnected place to compensate, in a specific embodiment, disconnected place compensates Method may is that the second edge, starting to scan to maximum column from 0 row, there is marginal point until finding To row;If scanning when there is marginal point pair in prostatitis, then connect with marginal point above, as up-to-date The line pair of connection;Scan when prostatitis is without marginal point pair, then from the first edge this row in the drawings Marginal point centering finds out marginal point fixed with previous column to (line of up-to-date connection to) immediate limit Edge point pair, then couples together, as the line pair of up-to-date connection;Scan when prostatitis is without edge Point is right, and does not also have marginal point pair in the first edge, does not processes.By (the line of up-to-date connection Right) marginal point of previous column is to extending transverse to this row, and couples together with edge line above, as The line pair of new connection.After above procedure scans maximum column, return to the head (first of up-to-date connection line pair The individual row finding marginal point pair), by this column border point to laterally extending toward 0 column direction.
In a specific embodiment, after determining the first edge, before determining the second edge, also include spy Go on a punitive expedition filter one: the marginal point on same vertical line, the most adjacent marginal point as the first marginal point pair, first The distance of the two edges point of marginal point pair is not more than the first preset value, if it is greater, then filter.In this programme First preset value is set to 30 each pixels, and 30 pixels are that the maximum value possible according to white bright band width defines Come, with specific reference to being actually needed setting.Such as Fig. 4, filter the schematic diagram of, Qi Zhongyi for feature of present invention Pixel on bar vertical line has 5 marginal points, and composition four is to marginal point pair, and respectively marginal point is to one, in figure With 1 representing, marginal point to two, in figure with 2 representing, marginal point to three, in figure with 3 representing, marginal point To four, represent with 4.As can be seen here marginal point to two and marginal point to four distance be above the limited One preset value, so can be filtered.Successively by all marginal points of condition that are unsatisfactory for deleting i.e. mistake Filter.
In a specific embodiment, after determining the first edge, before determining the second edge, also include spy Go on a punitive expedition filter two: the marginal point on same vertical line, the most adjacent marginal point is as the second marginal point pair.Then It is pre-whether each point reaches second to the brightness (i.e. gray value) of the pixel of the point midway between checking at 2 If value, this example schemes have employed 200 as the second preset value (maximum is 255).In this example, in vain The grey scale pixel value in color bright band region (i.e. effectively touch area), all more than 200, therefore takes 200 works For threshold value.If this threshold definitions obtains the biggest or the least False Rate that all can improve, need to come according to practical situation Statistical estimation.Successively all marginal points being unsatisfactory for condition are i.e. filtered deleting.
Features described above filtration one, characteristic filter two i.e. can only include one of which feature in any combination Filter, it is also possible to including two kinds, the order between characteristic filter can be in no particular order.The present embodiment is not only fitted For when the lateral length of effective touch area that prestores is more than longitudinal length, it is also possible to being applicable to ought be the most tactile Touch the lateral length in region less than situation during longitudinal length, or the situation that other images are sideling, according to tiltedly The mode of rate determines effective touch scope to it, and method is similar to, and does not specifically repeat them here.
Embodiment two
The present embodiment filters in combination with various features, and includes dispersion characteristic filter, i.e. characteristic filter four, Making filter effect more preferably, the effective touch area obtained is more accurate, thus saves internal memory, improves to detect and touch Touch efficiency a little and accuracy.The present embodiment is only more than longitudinal length with the lateral length of effective touch area Situation is described, and the lateral length of effective touch area is similar to, at this no longer less than the situation of longitudinal length List.
Step S101: effective touch area based on effective touch area image to gathering that prestores stores;
Step S102: detected touch point position from effective touch area of image.
Wherein, see Fig. 5, for the embodiment of the present invention two determines the schematic flow sheet of effective touch area that prestores, Including step:
Step S501: the gray scale of initial pictures is carried out rim detection, determines the first edge;
Step S502: in each marginal point that abscissa is identical, the most adjacent marginal point is as the 3rd marginal point Right, it is judged that whether the distance of the two edges point of each 3rd marginal point pair is more than the first preset value, if it is, Delete the distance the 3rd marginal point pair more than the first preset value;
Step S503: from delete after each 3rd marginal point centering, it is judged that each 3rd marginal point between, Whether the gray value of the pixel of predeterminated position, less than the second preset value, is less than if it is, delete gray value 3rd marginal point pair of the second preset value;
Step S504: delete the marginal point that abscissa is identical and marginal point number is more than two;
Step S505: judge marginal point sum and the marginal point sum ratio at the second edge that each vertical coordinate is identical Whether less than the 3rd preset value, if ratio is less than the 3rd preset value, delete on the vertical coordinate that this ratio is corresponding Marginal point, according to delete after edge determine the second edge;
Step S506: according to the first edge, the second edge is carried out disconnected place and compensate, to the second edge after compensating Carry out bearing of trend stretching, determine effective touch area that prestores.
Step S502, step S503, step S504, step S505 be properly termed as respectively characteristic filter one, Characteristic filter two, characteristic filter three, characteristic filter four.In traditional method, because camera head is mounted in The left and right sides of touch screen, system needs the image by gathering left and right camera head, is then entered by two pictures Row storage, and obtain the position, touch point in two width figures respectively, true according to the position of touch point in two width images Determine position on the touchscreen, touch point.And the present embodiment focuses on introducing how to determine touching on every figure Touch a position.This programme filters to remove excess margins by using various features to cross, and enters the edge after removing Row compensates, and obtains effective touch area that prestores of image, based on effective to image of effective touch area that prestores Touch area stores and detects, such that it is able to the position, touch point obtained in this image.Of course, it is possible to Use this programme method to ask two width figure each positions, touch point respectively, thus obtain touch point on the touchscreen Position.Specifically from effective touch area, how to find out position, touch point to find out from whole figure in prior art The method of touch point is identical, simply finds range shorter, and concrete grammar does not repeats them here.
First, the gray scale of initial pictures being carried out rim detection, edge detection method can use prior art In edge detection method, this programme is as a example by canny edge detection algorithm.The general process of canny algorithm is
1. use Gaussian filter noise reduction;
2. differential processes and obtains gradient magnitude and direction;
3. pair gradient carries out non-maxima suppression (non local maximum sets to 0);
4. gradient is filtered by dual threshold;
5. pair edge filtered out is attached.
It is of course also possible to use other edge detection methods, do not repeat them here.
As it is shown on figure 3, be the edge graph after rim detection of the present invention.White lines be process after the limit that obtains Edge.
Marginal point on same vertical line, the most adjacent marginal point is as the 3rd marginal point pair, the 3rd marginal point To the distance of two edges point be not more than the first preset value, if it is greater, then filter.In this programme, first is pre- If value is set to 30 pixels, 30 pixels are that the maximum value possible according to white bright band width defines out, With specific reference to being actually needed setting.As shown in Figure 4, wherein the pixel on a vertical line has 5 marginal points, Composition is four to marginal point pair, and respectively marginal point is to one, in figure with 1 representing, marginal point to two, with 2 in figure Represent, marginal point to three, in figure with 3 representing, marginal point to four, represent with 4.Marginal point as can be seen here To two and marginal point to four distance be above limit the first preset value, so can be filtered.Successively All marginal points being unsatisfactory for condition are i.e. filtered deleting.
Each 3rd marginal point centering after deleting, each some pixel to the point midway between checking at 2 Brightness (i.e. gray value) whether reach the second preset value, it is pre-as second that this example schemes have employed 200 If value (maximum is 255).In this example, the pixel ash of white bright band region (i.e. effectively touch area) Angle value, all more than 200, therefore takes 200 as threshold value.If this threshold definitions obtains the biggest or the least all False Rate can be improved, need to carry out statistical estimation according to practical situation.Successively, by all limits being unsatisfactory for condition Edge point is to deleting.Successively all marginal points being unsatisfactory for condition are i.e. filtered deleting.
After deleting remaining edge, delete the marginal point that abscissa is identical and marginal point number is more than two, The situation only existing a pair marginal point pair on the most same vertical line stays, being filtered more than a pair, will be all After marginal point scans through (after the most all marginal points compare), determine the second edge according to the edge after deleting.
Then, the marginal point that dispersion is big is deleted.Judge marginal point sum and the second limit that each vertical coordinate is identical Whether the marginal point sum ratio of edge is less than the 3rd preset value, if ratio is less than the 3rd preset value, deleting should The marginal point on vertical coordinate that ratio is corresponding, determines the second edge according to the edge after deleting.3rd preset value Can draw according to test of many times statistics.In a specific embodiment, following method can be used to carry out The edge that filter dispersion is big:
First adding up whole marginal point, sum is designated as T.Add up again often row exist marginal point S, S divided by T, Obtain ratio, calculate for convenience, ratio can be multiplied by 100, will its integer, naturally it is also possible to straight Connect and carry out later step by ratio mode.The present embodiment illustrates with integer form, then this ratio integer After set be designated as Rt.
Rt gathers sort descending, is then added up one by one (being i.e. worth bigger) arranged above, often adds one Secondary, do and once compare, until and more than four preset values time, then take the currency threshold value as next step, This example definition the 4th preset value is 75.Citing Rt set sort descending sequence be, 40,20,16,10... Then 40+20+16 > 75, takes 16 as threshold value.
Checking Rt set, the marginal point of this row, less than the row of threshold value 16, is filtered out by value.
The core of this filtration is to remove, i.e. those less than the marginal point of the pixel column of certain ratio containing marginal point The marginal point that those dispersions are big is considered as noise spot.After this step comes, obtain the second edge, Second edge is as the highest edge aggregation of confidence level.As shown in Figure 6, for the embodiment of the present invention 2 second limit Edge figure.
According to the first edge, the second edge is carried out disconnected place to compensate, to the second edge, start to maximum from 0 row Column scan, until finding the row that there is marginal point pair;If scanning when there is marginal point pair in prostatitis, then with front The marginal point connection in face, as the line pair of up-to-date connection;Scan when prostatitis is without marginal point pair, Then from the first edge the marginal point centering of this row in the drawings find out marginal point fixed with previous column to ( The line of new connection to) immediate marginal point pair, then couple together, as the line pair of up-to-date connection; Scan when prostatitis is without marginal point pair, and in the first edge, also there is no marginal point pair, do not do Process.By the marginal point of (line of up-to-date connection to) previous column to extending transverse to this row, and with above Edge line couple together, as the line pair of up-to-date connection.After above procedure scans maximum column, return to The head (first row finding marginal point pair) of up-to-date connection line pair, by this column border point to laterally toward 0 row Direction extends.I.e. can obtain presetting effective touch area.
In a specific embodiment, step S101 includes step:
Obtain the view data of image, be stored in rows in row data buffer zone, every line flag line number;
Judge that view data whether in the default line number prestoring effective touch area, is the most then deposited by line number Storage is in image buffer corresponding line.
Particularly as follows: camera head view data is by the DCMI interface of standard by view data line by line It is transferred in the row data buffer zone of mainboard internal memory, every line flag line number;Row data buffer zone is double buffering, When data line end of transmission, hardware, by automatic switchover row data buffer zone, then produces row and interrupts, with Time next line data may proceed to transmission;Judge line number whether in the range of limiting, the most then by picture number According to being stored in image buffer corresponding line, if it is not, be then not stored in image buffer;Then figure is judged As whether relief area reaches last column of effective touch area, the most then stop being stored in view data In image buffer, otherwise continue.When the whole two field picture of camera head is transmitted, DCMI interface will produce Frame interrupts.Line number is reset in frame interrupt processing.Wherein, by the line number of a variable record current line, often Secondary row interrupts then adding 1, and each frame interrupts then resetting.Respectively with initial row and the end of variable record effective range OK.If line number is more than or equal to initial row and less than end line, then it is assumed that this row is in effective range.Should Line number in effective range, is then deducted the initial row line number as effective range image buffer by row, and will Row buffer data are copied in the corresponding row of effective range image buffer.If line number is tied equal to limited range When bundle line number subtracts 1, gather with this two field picture of variable label.Limit the data volume of effective range Data volume less than original image
Concrete storage mode is not limited to the present embodiment mode, other existing storing modes can also, with specific reference to Need to set, do not repeat them here.
The method positioned according to above-mentioned touch point, the present invention provides a kind of touch point alignment system.
See Fig. 7, for the structural representation of inventive touch point positioning system embodiment, including:
Effectively touch area memory module 701, has for based on effective touch area image to gathering that prestores Effect touch area stores;
Detected touch point position module 702, for image effective from the storage of effective touch area memory module Detected touch point position in touch area;
Effective touch area that prestores determines module 703, for the gray scale of initial pictures is carried out rim detection, really Fixed first edge;When effective touch area lateral length more than longitudinal length time, delete abscissa identical and The marginal point number marginal point more than two, determines the second edge, according to the first edge according to the edge after deleting Second edge carries out disconnected place compensate, the second edge after compensating is carried out bearing of trend stretching, determines and prestore Effectively touch area;When the lateral length of effective touch area is less than longitudinal length, delete vertical coordinate identical And the marginal point that marginal point number is more than two, determine the 3rd edge according to the edge after deleting;According to the first limit Edge carries out disconnected place and compensates the 3rd edge, the 3rd edge after compensating is carried out bearing of trend stretching, determines pre- There is effect touch area.
In a specific embodiment, effective touch area that prestores determines that module also includes: the first filtering module, For when effective touch area lateral length more than longitudinal length time, in each marginal point that abscissa is identical, The most adjacent marginal point is as the first marginal point pair, it is judged that the distance of the two edges point of each first marginal point pair Whether more than the first preset value, when distance is more than the first preset value, then deletes this distance and preset more than first The marginal point pair of value;When the lateral length of effective touch area is less than longitudinal length, identical each of vertical coordinate In marginal point, the most adjacent marginal point is as the second marginal point pair, it is judged that the both sides of each second marginal point pair Whether the distance of edge point is more than the second preset value, when distance is more than the second preset value, then deletes this distance big Marginal point pair in the second preset value.
In a specific embodiment, effective touch area that prestores determines that module also includes: the second filtering module, For when effective touch area lateral length more than longitudinal length time, in each marginal point that abscissa is identical, Neighboring edge o'clock is as the 3rd marginal point pair two-by-two, it is judged that each 3rd marginal point between, predeterminated position Whether the gray value of pixel is less than the 3rd preset value, and when gray value is less than three preset values, then deleting should Gray value is less than the 3rd marginal point pair of the 3rd preset value;When the lateral length of effective touch area is less than longitudinally During length, in each marginal point that vertical coordinate is identical, neighboring edge o'clock is as the 4th marginal point pair two-by-two, it is judged that Each 4th marginal point between, the gray value of the pixel of predeterminated position whether less than the 4th preset value, when When gray value is less than four preset values, then delete this gray value the 4th marginal point pair less than the 4th preset value.
In a specific embodiment, effective touch area that prestores determines that module also includes: the 3rd filtering module, For when the lateral length of effective touch area that prestores is more than longitudinal length, determining the limit that each vertical coordinate is identical The ratio that edge point sum is total with the marginal point at the second edge, by each ratio descending, by descending Each ratio is added successively, often adds a ratio and determines a value, when this value is more than five preset values, takes and adds In number, minimum ratio is as threshold value, it is judged that whether each ratio is less than threshold value, when ratio is less than threshold value, and deleting should The marginal point on vertical coordinate that ratio is corresponding;When the lateral length of effective touch area that prestores is less than longitudinal length Time, determine the ratio of the total marginal point sum with the 3rd edge of marginal point that each abscissa is identical, by each ratio Value descending, is added each ratio of descending successively, often adds a ratio and determine a value, when this When value is more than six preset values, take in addend minimum ratio as threshold value, it is judged that each ratio whether less than threshold value, When ratio is less than threshold value, delete the marginal point on the abscissa that this ratio is corresponding.
In a specific embodiment, effective touch area that prestores determines that module includes: compensating module, is used for When the lateral length of effective touch area that prestores is more than longitudinal length, the second place, edge figure is opened from zero row The traversal that begins detection, when detecting row and there is marginal point, marginal point, as determining marginal point, continues the second limit The row of edge place figure detect;When there is not marginal point in detection row, corresponding detection the first place, edge figure Detection row whether there is marginal point, when the first marginal existence marginal point, from corresponding second edge of this marginal point Each marginal point in find out and determine the distance of the marginal point marginal point in preset range, according to the limit found out Second edge is compensated by edge o'clock, when the first edge does not exists marginal point, continues the second place, edge The row of figure are scanned;When the lateral length of effective touch area that prestores is less than longitudinal length, to the 3rd limit Edge place figure begins stepping through detection from zero row, and when detection row exists marginal point, marginal point is as determining edge Point, continues to detect the row of the 3rd place, edge figure;When detect capable there is not marginal point time, corresponding inspection Whether the detection row surveying the first place, edge figure exists marginal point, when the first marginal existence marginal point, from this limit Each marginal point at corresponding 3rd edge of edge point is found out and determines the distance of the marginal point edge in preset range Point, compensates the 3rd edge according to the marginal point found out, and when the first edge does not exists marginal point, continues The continuous row to the 3rd place, edge figure is scanned.
In a specific embodiment, effective touch area memory module includes: row data buffer module, uses In the view data of acquisition image, store in rows, every line flag line number;Image buffers module, For when line number is in the default line number of effective touch area that prestores, view data being stored in corresponding line.
Specific implementation has been described above, and does not repeats them here.Wherein it is possible to only include the first filtration mould One or more in block, the second filtering module, the 3rd filtering module, set with specific reference to needs.
Embodiment described above only have expressed the several embodiments of the present invention, and it describes more concrete and detailed, But therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that, for this area Those of ordinary skill for, without departing from the inventive concept of the premise, it is also possible to make some deformation and Improving, these broadly fall into protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be with appended Claim is as the criterion.

Claims (8)

1. the method for location, a touch point, it is characterised in that include step:
Effective touch area based on effective touch area image to gathering that prestores stores, from described figure Detected touch point position in effective touch area of picture, wherein, described in prestore effective touch area by following Step determines:
The gray scale of initial pictures is carried out rim detection, determines the first edge;
When the lateral length of effective touch area is more than longitudinal length, deletion abscissa is identical and marginal point individual The number marginal point more than two, determines the second edge, according to described first edge to institute according to the edge after deleting State the second edge and carry out the compensation of disconnected place, the second edge after compensating is carried out bearing of trend stretching, determine described Prestore effective touch area;
When the lateral length of effective touch area is less than longitudinal length, deletion vertical coordinate is identical and marginal point individual The number marginal point more than two, determines the 3rd edge according to the edge after deleting;According to described first edge to institute State the 3rd edge and carry out the compensation of disconnected place, the 3rd edge after compensating is carried out bearing of trend stretching, determine described Prestore effective touch area;
Described determine the first edge after, described determine the second edge before, further comprise the steps of:
In each marginal point that abscissa is identical, the most adjacent marginal point is as the first marginal point pair, it is judged that each Whether the distance of the two edges point of described first marginal point pair is more than the first preset value, if it is, delete institute State the distance the first marginal point pair more than the first preset value;
Or
In each marginal point that abscissa is identical, neighboring edge o'clock is as the second marginal point pair two-by-two, it is judged that each institute State the second marginal point between, the gray value of the pixel of predeterminated position whether less than the second preset value, as Fruit is, then delete the described gray value the second marginal point pair less than the second preset value;
Or
In each marginal point that abscissa is identical, the most adjacent marginal point is as the 3rd marginal point pair, it is judged that each Whether the distance of the two edges point of described 3rd marginal point pair is more than the first preset value, if it is, delete institute State the distance the 3rd marginal point pair more than the first preset value;Each 3rd marginal point centering after deleting, it is judged that Each 3rd marginal point between, the gray value of the pixel of predeterminated position whether less than the second preset value, as Fruit is, then delete the described gray value the 3rd marginal point pair less than the second preset value;
Described determine the first edge after, described determine the 3rd edge before, further comprise the steps of:
In each marginal point that vertical coordinate is identical, the most adjacent marginal point is as the 4th marginal point pair, it is judged that each Whether the distance of the two edges point of described 4th marginal point pair is more than the 3rd preset value, if it is, delete institute State the distance the 4th marginal point pair more than the 3rd preset value;
Or
In each marginal point that vertical coordinate is identical, neighboring edge o'clock is as the 5th marginal point pair two-by-two, it is judged that each institute State the 5th marginal point between, the gray value of the pixel of predeterminated position whether less than the 4th preset value, as Fruit is, then delete the described gray value the 5th marginal point pair less than the 4th preset value;
Or
In each marginal point that vertical coordinate is identical, the most adjacent marginal point is as the 6th marginal point pair, it is judged that each Whether the distance of the two edges point of described 6th marginal point pair is more than the 3rd preset value, if it is, delete institute State the distance the 6th marginal point pair more than the 3rd preset value;Each 6th marginal point centering after deleting, it is judged that Each 6th marginal point between, the gray value of the pixel of predeterminated position whether less than the 4th preset value, as Fruit is, then delete the described gray value the 6th marginal point pair less than the 4th preset value.
The method of location, touch point the most according to claim 1, it is characterised in that
Described determine the second edge after, determine described in prestore before effective touch area, also include:
Judge that total and described second edge the marginal point sum ratio of marginal point that each vertical coordinate is identical is the least In the 5th preset value, if ratio is less than the 5th preset value, delete the edge on the vertical coordinate that this ratio is corresponding Point;
Or
Determine the ratio of the total marginal point sum with described second edge of marginal point that each vertical coordinate is identical, will Each described ratio descending, is added successively by each ratio of descending, often adds a ratio and determines one Value, when this value is more than six preset values, takes in addend minimum ratio as threshold value, it is judged that each described ratio Whether less than described threshold value, if ratio is less than described threshold value, delete the limit on the vertical coordinate that this ratio is corresponding Edge point;
Described determine the 3rd edge after, determine described in prestore before effective touch area, also include:
Judge that total and described 3rd edge the marginal point sum ratio of marginal point that each abscissa is identical is the least In the 7th preset value, if ratio is less than the 7th preset value, delete the edge on the abscissa that this ratio is corresponding Point;
Or
Determine the ratio of the total marginal point sum with described 3rd edge of marginal point that each abscissa is identical, will Each described ratio descending, is added successively by each ratio of descending, often adds a ratio and determines one Value, when this value is more than eight preset values, takes in addend minimum ratio as threshold value, it is judged that each described ratio Whether less than described threshold value, if ratio is less than described threshold value, delete the limit on the abscissa that this ratio is corresponding Edge point.
The method of location, touch point the most according to claim 1, it is characterised in that
The described disconnected place compensation process that carries out described second edge according to described first edge includes: to described the Two place, edge figures begin stepping through detection from zero row, when detecting row and there is marginal point, and described marginal point conduct Determine marginal point, continue the row of described second place, edge figure are detected;When detection row do not exist edge During point, whether the described detection row of corresponding detection the first place, edge figure exist marginal point, if the first edge There is marginal point, find out and the distance determining marginal point from each marginal point at corresponding second edge of this marginal point Marginal point in preset range, compensates described second edge according to the described marginal point found out, as When really the first edge does not exists marginal point, continue the row of described second place, edge figure are scanned;
The described disconnected place compensation process that carries out described 3rd edge according to described first edge includes: to described the Three place, edge figures begin stepping through detection from zero row, when there is marginal point in detection row, and described marginal point conduct Determine marginal point, continue the row of described 3rd place, edge figure is detected;Edge is there is not when detection is capable During point, whether the described detection row of corresponding detection the first place, edge figure exists marginal point, if the first edge There is marginal point, find out and the distance determining marginal point from each marginal point at corresponding 3rd edge of this marginal point Marginal point in preset range, compensates described 3rd edge according to the described marginal point found out, as When really the first edge does not exists marginal point, continue the row of described 3rd place, edge figure is scanned.
The method of location, touch point the most according to claim 2, it is characterised in that
The described disconnected place compensation process that carries out described second edge according to described first edge includes: to described the Two place, edge figures begin stepping through detection from zero row, when detecting row and there is marginal point, and described marginal point conduct Determine marginal point, continue the row of described second place, edge figure are detected;When detection row do not exist edge During point, whether the described detection row of corresponding detection the first place, edge figure exist marginal point, if the first edge There is marginal point, find out and the distance determining marginal point from each marginal point at corresponding second edge of this marginal point Marginal point in preset range, compensates described second edge according to the described marginal point found out, as When really the first edge does not exists marginal point, continue the row of described second place, edge figure are scanned;
The described disconnected place compensation process that carries out described 3rd edge according to described first edge includes: to described the Three place, edge figures begin stepping through detection from zero row, when there is marginal point in detection row, and described marginal point conduct Determine marginal point, continue the row of described 3rd place, edge figure is detected;Edge is there is not when detection is capable During point, whether the described detection row of corresponding detection the first place, edge figure exists marginal point, if the first edge There is marginal point, find out and the distance determining marginal point from each marginal point at corresponding 3rd edge of this marginal point Marginal point in preset range, compensates described 3rd edge according to the described marginal point found out, as When really the first edge does not exists marginal point, continue the row of described 3rd place, edge figure is scanned.
The method of location, touch point the most according to claim 1, it is characterised in that described based on prestoring Effectively effective touch area of the touch area image to gathering carries out storage and includes step:
Obtain the view data of described image, be stored in rows in row data buffer zone, every line flag Line number;
Judge described line number whether in the default line number of described effective touch area that prestores, the most then by institute State view data to be stored in image buffer corresponding line.
6. a touch point alignment system, it is characterised in that including:
Effectively touch area memory module, for based on the effective of effective touch area image to gathering that prestore Touch area stores;
Detected touch point position module, for the described image from the storage of described effective touch area memory module Effective touch area in detected touch point position;
Effective touch area that prestores determines module, for the gray scale of initial pictures is carried out rim detection, determines First edge;
When the lateral length of effective touch area is more than longitudinal length, deletion abscissa is identical and marginal point individual The number marginal point more than two, determines the second edge, according to described first edge to institute according to the edge after deleting State the second edge and carry out the compensation of disconnected place, the second edge after compensating is carried out bearing of trend stretching, determine described Prestore effective touch area;
When the lateral length of effective touch area is less than longitudinal length, deletion vertical coordinate is identical and marginal point individual The number marginal point more than two, determines the 3rd edge according to the edge after deleting;According to described first edge to institute State the 3rd edge and carry out the compensation of disconnected place, the 3rd edge after compensating is carried out bearing of trend stretching, determine described Prestore effective touch area;
Described effective touch area that prestores determines that module also includes:
First filtering module, is used for when the lateral length of effective touch area is more than longitudinal length, abscissa In identical each marginal point, the most adjacent marginal point is as the first marginal point pair, it is judged that each described first limit Whether the distance of the two edges point of edge point pair is more than the first preset value, when distance is more than the first preset value, then Delete this distance marginal point pair more than the first preset value;When the lateral length of effective touch area is less than longitudinally During length, in each marginal point that vertical coordinate is identical, the most adjacent marginal point, as the second marginal point pair, is sentenced Whether the distance of the two edges point of disconnected each described second marginal point pair is more than the second preset value, when distance is more than the During two preset values, then delete this distance marginal point pair more than the second preset value;
And/or
Second filtering module, is used for when the lateral length of effective touch area is more than longitudinal length, abscissa In identical each marginal point, neighboring edge o'clock is as the 3rd marginal point pair two-by-two, it is judged that each described 3rd edge Point between, the gray value of the pixel of predeterminated position whether less than the 3rd preset value, when gray value is less than During three preset values, then delete this gray value the 3rd marginal point pair less than the 3rd preset value;When effectively touching When the lateral length in region is less than longitudinal length, in each marginal point that vertical coordinate is identical, neighboring edge point two-by-two As the 4th marginal point pair, it is judged that each described 4th marginal point between, the ash of the pixel of predeterminated position Whether angle value, less than the 4th preset value, when gray value is less than four preset values, is then deleted this gray value and is less than 4th marginal point pair of the 4th preset value;
And/or
3rd filtering module, is used for when the lateral length of effective touch area that prestores is more than longitudinal length, really The ratio of the total marginal point sum with described second edge of marginal point that fixed each vertical coordinate is identical, by each described Ratio descending, is added successively by each ratio of descending, often adds a ratio and determines a value, when When this value is more than five preset values, take in addend minimum ratio as threshold value, it is judged that each described ratio is the least In described threshold value, when ratio is less than described threshold value, delete the marginal point on the vertical coordinate that this ratio is corresponding;When Prestore effective touch area lateral length less than longitudinal length time, determine that the marginal point that each abscissa is identical is total The ratio that number is total with the marginal point at described 3rd edge, by each described ratio descending, by descending Each ratio be added successively, often add a ratio and determine a value, when this value more than six preset values time, take In addend, minimum ratio is as threshold value, it is judged that whether each described ratio is less than described threshold value, when ratio is less than institute State threshold value, delete the marginal point on the abscissa that this ratio is corresponding.
Touch point the most according to claim 6 alignment system, it is characterised in that described in prestore and effectively touch Touch area determination module to include:
Compensating module, for when the lateral length of effective touch area that prestores is more than longitudinal length, to described Second place, edge figure begins stepping through detection from zero row, and when detecting row and there is marginal point, described marginal point is made For determining marginal point, continue the row of described second place, edge figure are detected;When detection row do not exist limit During edge point, whether the described detection row of corresponding detection the first place, edge figure exist marginal point, when the first edge There is marginal point, find out and the distance determining marginal point from each marginal point at corresponding second edge of this marginal point Marginal point in preset range, compensates described second edge according to the described marginal point found out, when When first edge does not exists marginal point, continue the row of described second place, edge figure are scanned;When prestoring When effectively the lateral length of touch area is less than longitudinal length, to described 3rd place, edge figure from the beginning of zero row Traversal detection, when detection row exists marginal point, described marginal point, as determining marginal point, continues described The row of the 3rd place, edge figure detects;When detect capable there is not marginal point time, corresponding detection the first edge Whether the described detection row of place figure exists marginal point, when the first marginal existence marginal point, from this marginal point pair Answer the distance finding out and determining marginal point in each marginal point at the 3rd edge marginal point in preset range, root According to the described marginal point found out, described 3rd edge is compensated, when there is not marginal point in the first edge, Continue the row of described 3rd place, edge figure is scanned.
Touch point the most according to claim 6 alignment system, it is characterised in that described effective Petting Area Territory memory module includes:
Row data buffer module, for obtaining the view data of described image, stores in rows, Every line flag line number;
Image buffers module, is used for when described line number is in the default line number of described effective touch area that prestores, Described view data is stored in corresponding line.
CN201310205618.7A 2013-05-28 2013-05-28 Method and system for positioning touch point Active CN103279235B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310205618.7A CN103279235B (en) 2013-05-28 2013-05-28 Method and system for positioning touch point

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310205618.7A CN103279235B (en) 2013-05-28 2013-05-28 Method and system for positioning touch point

Publications (2)

Publication Number Publication Date
CN103279235A CN103279235A (en) 2013-09-04
CN103279235B true CN103279235B (en) 2016-08-10

Family

ID=49061788

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310205618.7A Active CN103279235B (en) 2013-05-28 2013-05-28 Method and system for positioning touch point

Country Status (1)

Country Link
CN (1) CN103279235B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101131B (en) * 2018-08-02 2021-05-04 深圳市德明利技术股份有限公司 Touch identification method and device and touch display device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881255A (en) * 2005-06-15 2006-12-20 华为技术有限公司 Digital image edge information extracting method
CN101727239A (en) * 2008-10-17 2010-06-09 三星移动显示器株式会社 Method and apparatus for detecting touch point and display device
CN102404594A (en) * 2011-10-31 2012-04-04 庞志勇 2D-to-3D conversion method based on image edge information
EP2523076A2 (en) * 2009-11-18 2012-11-14 LG Electronics Inc. Touch panel, touch panel drive method and display device comprising a touch panel
CN103065307A (en) * 2012-12-25 2013-04-24 上海交通大学 Satellite for earth probationary observation (SAR/SPOT) graphical regional integration detection method under non-precision registration

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881255A (en) * 2005-06-15 2006-12-20 华为技术有限公司 Digital image edge information extracting method
CN101727239A (en) * 2008-10-17 2010-06-09 三星移动显示器株式会社 Method and apparatus for detecting touch point and display device
EP2523076A2 (en) * 2009-11-18 2012-11-14 LG Electronics Inc. Touch panel, touch panel drive method and display device comprising a touch panel
CN102404594A (en) * 2011-10-31 2012-04-04 庞志勇 2D-to-3D conversion method based on image edge information
CN103065307A (en) * 2012-12-25 2013-04-24 上海交通大学 Satellite for earth probationary observation (SAR/SPOT) graphical regional integration detection method under non-precision registration

Also Published As

Publication number Publication date
CN103279235A (en) 2013-09-04

Similar Documents

Publication Publication Date Title
CN103997631B (en) A kind of LED pointwise position contour extraction method based on camera shooting and system
CN106851264B (en) Camera module lens surface detection method and device
US6661838B2 (en) Image processing apparatus for detecting changes of an image signal and image processing method therefor
WO2014106445A1 (en) Method and apparatus for detecting backlight
CN108830133A (en) Recognition methods, electronic device and the readable storage medium storing program for executing of contract image picture
KR20090101356A (en) Defect detecting device, and defect detecting method
JP2008283649A (en) Image processing method, image region detecting method, image processing program, image region detection program, image processing apparatus, and image region detecting apparatus
US20110145725A1 (en) Methods and Systems for Attaching Semantics to a Collaborative Writing Surface
CN106774846B (en) Alternative projection method and device
CN105701809A (en) Flat-field correction method based on line-scan digital camera scanning
CN106651837A (en) White glass plate surface edge breakage defect detecting method
US9196051B2 (en) Electronic equipment with image analysis function and related method
CN114495815B (en) Demura method, computing device and storage medium of miniature display screen
CN107480678A (en) A kind of chessboard recognition methods and identifying system
JP2009229197A (en) Linear defect detecting method and device
CN102629969A (en) Smear eliminating method during shooting of plane objects
CN101995325A (en) Appearance detection method and system of image sensor
KR101977647B1 (en) Apparatus and Method for Detection MURA in Display Device
CN103279235B (en) Method and system for positioning touch point
CN103279234B (en) Method and system for positioning touch point
JP4167680B2 (en) Document reading apparatus and document reading method
CN104112271A (en) Detection method and system for housing side defect of mobile terminal
CN101364303B (en) Edge pixel extracting and processing method
CN112598652A (en) Liquid crystal display edge broken line detection method based on gradient transformation
JP5846100B2 (en) Display device defect inspection method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant