US20110052054A1 - Method and apparatus for positioning edges of photograph - Google Patents
Method and apparatus for positioning edges of photograph Download PDFInfo
- Publication number
- US20110052054A1 US20110052054A1 US12/612,478 US61247809A US2011052054A1 US 20110052054 A1 US20110052054 A1 US 20110052054A1 US 61247809 A US61247809 A US 61247809A US 2011052054 A1 US2011052054 A1 US 2011052054A1
- Authority
- US
- United States
- Prior art keywords
- photograph
- rgb
- vertexes
- positions
- pixels
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
Definitions
- the present disclosure relates to position methods and apparatuses, and particularly to a method and apparatus for positioning edges of a photograph.
- the test cannot be accurately implemented, and can not acquire right test results. For example, when testing whether a photograph having spots, the photograph is divided into a plurality of small areas, and then check if a density of each of the small areas is smaller than a pre-set threshold value. If the fringes of the photograph are wrongly positioned, the above test often gets wrong result.
- FIG. 1 is a block view of an apparatus for positioning the edges of a photograph.
- FIG. 2 is a sketch view of positioning vertexes on a photograph.
- FIG. 3 is a flow view of a method for positioning edges of a photograph.
- an apparatus in an embodiment for positioning edges of a photograph includes an electronic device 10 and an edge positioning device 20 .
- the electronic device 10 includes a camera module 12 for taking photograph, and a storage module 14 for storing the photographs taken by the camera module 12 .
- the edge positioning device 20 is used to position edges of the photographs taken by the electronic device 10 .
- the edge positioning device 20 includes a photograph obtaining module 21 , a RGB (red, green, blue) value processing module 23 , a vertex computing module 25 , and a vertex correction module 27 .
- the photograph obtaining module 21 obtains photograph from the electronic device 10 .
- the RGB value processing module 23 is capable of processing the RGB values of all of the pixels of a photograph. For example, if a photograph has a scale of 2048 Pixel *1536 Pixel, positions of the pixels of the photograph are (x, y), specifically, (1, 1), (1, 2) . . . (1, 1536) . . . (2048, 1536), and RGB values of the pixels are set to f(x, y), specifically, f(1, 1), f(1, 2) . . . f(1, 1536) . . . f(2048, 1536). The RGB value processing module 23 processes these RGB values to get corresponding RGB modification values G(x, y) according to the following formula:
- ⁇ xf ( x,y ) f ( x ⁇ 1, y+ 1)+2 f ( x,y+ 1)+ f ( x+ 1, y+ 1) ⁇ f ( x ⁇ 1, y ⁇ 1) ⁇ 2 f ( x,y ⁇ 1) ⁇ f ( x+ 1, y ⁇ 1);
- ⁇ yf ( x,y ) f ( x ⁇ 1, y ⁇ 1)+2 f ( x ⁇ 1, y )+ f ( x ⁇ 1, y )+ f ( x ⁇ 1, y+ 1) ⁇ f ( x+ 1, y ⁇ 1) ⁇ 2 f ( x+ 1, y ) ⁇ f ( x+ 1, y+ 1);
- the vertex computing module 25 is used to position the vertexes of the photograph.
- the vertex computing module 25 sets one area on each corner of the photograph, for example, setting four circular areas on four corners of a photograph 100 which is taken by the electronic device 10 .
- the vertex computing module 25 compares RGB modification value G(x, y) of different pixel in one circular area with a threshold value which is pre-set by the vertex computing module 25 , until gets a pixel whose RGB modification value G(x, y) is greater than the threshold value.
- a line 31 extends horizontally from the gotten pixel, and another line 32 extends vertically from the gotten pixel.
- RGB modification values G(x, y) of twenty pixels which are on each of the lines 31 and 32 and adjacent the gotten pixel are compared to the threshold value. If most of the twenty pixels on the lines 31 and 32 are greater than the threshold vale, it represents RGB modification value is continuous from the gotten pixel, and the gotten pixel is set as an vertex, such as the pixels P 1 , P 2 , P 3 , and P 4 in FIG. 2 .
- the vertex correction module 27 is used to correct the positions of the vertexes set by the vertex computing module 25 . For example, if positions of the pixels of the pixels P 1 , P 2 , P 3 , and P 4 are respectively P 1 (x1, y1), P 2 (x2, y2), P 3 (x3, y3), and P 4 (x4, y4). Then, the corrected vertexes are respectively P 1 ′((x1+x3)/2, (y1+y2)/2), P 2 ′((x2+x4)/2, (y1+y2)/2), P 3 ′((x1+x3)/2, (y3+y4)/2), and P 4 ′((x2+x4)/2, (y3+y4)/2). The vertexes P 1 ′, P 2 ′, P 3 ′, and P 4 ′ are connected in order to form edges of the photograph. Then, the edges of the photograph are precisely positioned to assure correctness of the test of photograph.
- a method for positioning edges of a photograph in an embodiment includes following steps.
- step S 01 the photograph obtaining module 21 obtains a photograph, which is taken by the camera module 12 of the electronic device 10 , from the storage module 14 ;
- step S 02 the RGB value processing module 23 processes RGB values of all of the pixels of the photograph to get corresponding RGB modification values of all of the pixels of the photograph;
- step S 03 the vertex computing module 25 computes a position of a vertex on a top left corner of the photograph according to the RGB modification values;
- step S 04 the vertex computing module 25 computes a position of a vertex on a top right corner of the photograph according to the RGB modification values;
- step S 05 the vertex computing module 25 computes a position of an vertex on a bottom left corner of the photograph according to the RGB modification values;
- step S 06 the vertex computing module 25 computes a position of an vertex on a bottom right corner of the photograph according to the RGB modification values;
- step S 07 the vertex correction module 27 corrects the positions of vertexes, and connects the corrected vertexes to form edges of the photograph.
- the step S 07 can be omitted.
- the vertex computing module 25 computes positions of four vertexes of the photograph, the four vertexes can be connected to form the edges of the photograph directly.
Abstract
Description
- 1. Technical Field
- The present disclosure relates to position methods and apparatuses, and particularly to a method and apparatus for positioning edges of a photograph.
- 2. Description of Related Art
- At present, more and more electronic devices are equipped with camera modules for taking photographs. It often needs to test the camera modules before these electronic devices come into the market. The test often includes testing whether the photographs have black margins, spots, and so on.
- However, if fringes of the photograph cannot be positioned precisely, the test cannot be accurately implemented, and can not acquire right test results. For example, when testing whether a photograph having spots, the photograph is divided into a plurality of small areas, and then check if a density of each of the small areas is smaller than a pre-set threshold value. If the fringes of the photograph are wrongly positioned, the above test often gets wrong result.
- Therefore, there is room for improvement within the art.
- Many aspects of the embodiments can be better understood with references to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the embodiments. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
-
FIG. 1 is a block view of an apparatus for positioning the edges of a photograph. -
FIG. 2 is a sketch view of positioning vertexes on a photograph. -
FIG. 3 is a flow view of a method for positioning edges of a photograph. - The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.
- Referring to
FIG. 1 , an apparatus in an embodiment for positioning edges of a photograph, includes anelectronic device 10 and anedge positioning device 20. - The
electronic device 10 includes acamera module 12 for taking photograph, and astorage module 14 for storing the photographs taken by thecamera module 12. - The
edge positioning device 20 is used to position edges of the photographs taken by theelectronic device 10. Theedge positioning device 20 includes aphotograph obtaining module 21, a RGB (red, green, blue)value processing module 23, avertex computing module 25, and avertex correction module 27. Thephotograph obtaining module 21 obtains photograph from theelectronic device 10. - The RGB
value processing module 23 is capable of processing the RGB values of all of the pixels of a photograph. For example, if a photograph has a scale of 2048 Pixel *1536 Pixel, positions of the pixels of the photograph are (x, y), specifically, (1, 1), (1, 2) . . . (1, 1536) . . . (2048, 1536), and RGB values of the pixels are set to f(x, y), specifically, f(1, 1), f(1, 2) . . . f(1, 1536) . . . f(2048, 1536). The RGBvalue processing module 23 processes these RGB values to get corresponding RGB modification values G(x, y) according to the following formula: -
Δxf(x,y)=f(x−1,y+1)+2f(x,y+1)+f(x+1,y+1)−f(x−1,y−1)−2f(x,y−1)−f(x+1,y−1); -
Δyf(x,y)=f(x−1,y−1)+2f(x−1,y)+f(x−1,y)+f(x−1,y+1)−f(x+1,y−1)−2f(x+1,y)−f(x+1,y+1); -
then, G(x,y)=|Δxf(x,y)|+|Δyf(x,y)|. - Referring to
FIGS. 1 and 2 , thevertex computing module 25 is used to position the vertexes of the photograph. Thevertex computing module 25 sets one area on each corner of the photograph, for example, setting four circular areas on four corners of a photograph 100 which is taken by theelectronic device 10. Thevertex computing module 25 compares RGB modification value G(x, y) of different pixel in one circular area with a threshold value which is pre-set by thevertex computing module 25, until gets a pixel whose RGB modification value G(x, y) is greater than the threshold value. Aline 31 extends horizontally from the gotten pixel, and anotherline 32 extends vertically from the gotten pixel. RGB modification values G(x, y) of twenty pixels which are on each of thelines lines FIG. 2 . - The
vertex correction module 27 is used to correct the positions of the vertexes set by thevertex computing module 25. For example, if positions of the pixels of the pixels P1, P2, P3, and P4 are respectively P1(x1, y1), P2(x2, y2), P3(x3, y3), and P4(x4, y4). Then, the corrected vertexes are respectively P1′((x1+x3)/2, (y1+y2)/2), P2′((x2+x4)/2, (y1+y2)/2), P3′((x1+x3)/2, (y3+y4)/2), and P4′((x2+x4)/2, (y3+y4)/2). The vertexes P1′, P2′, P3′, and P4′ are connected in order to form edges of the photograph. Then, the edges of the photograph are precisely positioned to assure correctness of the test of photograph. - Referring to
FIG. 3 , a method for positioning edges of a photograph in an embodiment, includes following steps. - In step S01, the
photograph obtaining module 21 obtains a photograph, which is taken by thecamera module 12 of theelectronic device 10, from thestorage module 14; - In step S02, the RGB
value processing module 23 processes RGB values of all of the pixels of the photograph to get corresponding RGB modification values of all of the pixels of the photograph; - In step S03, the
vertex computing module 25 computes a position of a vertex on a top left corner of the photograph according to the RGB modification values; - In step S04, the
vertex computing module 25 computes a position of a vertex on a top right corner of the photograph according to the RGB modification values; - In step S05, the
vertex computing module 25 computes a position of an vertex on a bottom left corner of the photograph according to the RGB modification values; - In step S06, the
vertex computing module 25 computes a position of an vertex on a bottom right corner of the photograph according to the RGB modification values; - In step S07, the
vertex correction module 27 corrects the positions of vertexes, and connects the corrected vertexes to form edges of the photograph. - In the above method, the step S07 can be omitted. After the
vertex computing module 25 computes positions of four vertexes of the photograph, the four vertexes can be connected to form the edges of the photograph directly. - It is to be understood, however, that even though numerous characteristics and advantages of the embodiments have been set forth in the foregoing description, together with details of the structure and function of the embodiments, the disclosure is illustrative only, and changes may be made in detail, especially in matters of shape, size, and arrangement of parts within the principles of the present disclosure to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed.
- It is also to be understood that the above description and the claims drawn to a method may include some indication in reference to certain steps. However, the indication used is only to be viewed for identification purposes and not as a suggestion as to an order for the steps.
Claims (15)
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910306407.6 | 2009-08-31 | ||
CN200910306407 | 2009-08-31 | ||
CN200910306407.6A CN102005038B (en) | 2009-08-31 | 2009-08-31 | Image edge positioning method |
Publications (2)
Publication Number | Publication Date |
---|---|
US20110052054A1 true US20110052054A1 (en) | 2011-03-03 |
US8345965B2 US8345965B2 (en) | 2013-01-01 |
Family
ID=43625004
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US12/612,478 Expired - Fee Related US8345965B2 (en) | 2009-08-31 | 2009-11-04 | Method and apparatus for positioning edges of photograph |
Country Status (2)
Country | Link |
---|---|
US (1) | US8345965B2 (en) |
CN (1) | CN102005038B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20160130617A (en) | 2015-05-04 | 2016-11-14 | (주)델타온 | Method and service server for managing transport vehicle |
US20230298375A1 (en) * | 2018-10-19 | 2023-09-21 | Capital One Services, Llc | Image processing to detect a rectangular object |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108111914B (en) * | 2016-11-24 | 2020-11-03 | 阿里巴巴(中国)有限公司 | Video playing area identification method and device and media playing equipment |
CN112132163B (en) * | 2020-09-21 | 2024-04-02 | 杭州睿琪软件有限公司 | Method, system and computer readable storage medium for identifying object edges |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6011857A (en) * | 1997-08-07 | 2000-01-04 | Eastman Kodak Company | Detecting copy restrictive documents |
US6175844B1 (en) * | 1997-05-29 | 2001-01-16 | Adobe Systems Incorporated | Ordering groups of text in an image |
US7519236B2 (en) * | 2003-04-09 | 2009-04-14 | Arcsoft, Inc. | Image retrieval |
US8044955B1 (en) * | 2007-08-31 | 2011-10-25 | Adobe Systems Incorporated | Dynamic tessellation spreading for resolution-independent GPU anti-aliasing and rendering |
-
2009
- 2009-08-31 CN CN200910306407.6A patent/CN102005038B/en active Active
- 2009-11-04 US US12/612,478 patent/US8345965B2/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6175844B1 (en) * | 1997-05-29 | 2001-01-16 | Adobe Systems Incorporated | Ordering groups of text in an image |
US6011857A (en) * | 1997-08-07 | 2000-01-04 | Eastman Kodak Company | Detecting copy restrictive documents |
US7519236B2 (en) * | 2003-04-09 | 2009-04-14 | Arcsoft, Inc. | Image retrieval |
US8044955B1 (en) * | 2007-08-31 | 2011-10-25 | Adobe Systems Incorporated | Dynamic tessellation spreading for resolution-independent GPU anti-aliasing and rendering |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20160130617A (en) | 2015-05-04 | 2016-11-14 | (주)델타온 | Method and service server for managing transport vehicle |
US20230298375A1 (en) * | 2018-10-19 | 2023-09-21 | Capital One Services, Llc | Image processing to detect a rectangular object |
Also Published As
Publication number | Publication date |
---|---|
US8345965B2 (en) | 2013-01-01 |
CN102005038A (en) | 2011-04-06 |
CN102005038B (en) | 2014-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108009675B (en) | Goods packing method, device and system | |
CA2867365C (en) | Method, system and computer storage medium for face detection | |
US7664315B2 (en) | Integrated image processor | |
US8199202B2 (en) | Image processing device, storage medium storing image processing program, and image pickup apparatus | |
US8422773B2 (en) | Image zone detecting using color gradation levels, method, apparatus and computer readable medium | |
CN109479082B (en) | Image processing method and apparatus | |
US20130307755A1 (en) | Apparatus, system and method for image adjustment | |
KR101434484B1 (en) | Apparatus and method for vision inspecting using image division | |
EP2940626B1 (en) | Apparatus and method for detecting color checker in image | |
US8345965B2 (en) | Method and apparatus for positioning edges of photograph | |
CA2889886A1 (en) | System and method of adaptive color correction for pill recognition in digital images | |
CN109685789A (en) | The battery core surface gummed paper detection method and device of view-based access control model detection | |
US9196051B2 (en) | Electronic equipment with image analysis function and related method | |
US9239230B2 (en) | Computing device and method for measuring widths of measured parts | |
CN108709500B (en) | Circuit board element positioning and matching method | |
US8547430B2 (en) | System and method for marking discrepancies in image of object | |
CN111915485A (en) | Rapid splicing method and system for feature point sparse workpiece images | |
CN117058411A (en) | Method, device, medium and equipment for identifying edge appearance flaws of battery | |
JP2012007952A (en) | Visual inspection device | |
US9578320B1 (en) | Methods and apparatus for defect correction in image sensor outputs | |
CN112597832B (en) | Rectangular piece installation deviation judgment method and device | |
EP2884733B1 (en) | Display device and method for correcting colors of a face image | |
CN113610091A (en) | Intelligent identification method and device for air switch state and storage medium | |
US11232289B2 (en) | Face identification method and terminal device using the same | |
JP2015052972A (en) | Measuring computer program, measuring device, and measuring method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: HONG FU JIN PRECISION INDUSTRY (SHENZHEN) CO., LTD Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:WU, WEN-YI;REEL/FRAME:023470/0480 Effective date: 20091030 Owner name: HON HAI PRECISION INDUSTRY CO., LTD., TAIWAN Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:WU, WEN-YI;REEL/FRAME:023470/0480 Effective date: 20091030 |
|
REMI | Maintenance fee reminder mailed | ||
LAPS | Lapse for failure to pay maintenance fees | ||
STCH | Information on status: patent discontinuation |
Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362 |
|
FP | Lapsed due to failure to pay maintenance fee |
Effective date: 20170101 |