Download presentation
Presentation is loading. Please wait.
Published byHoward Mason Modified over 8 years ago
1
Kfir Wolfson & Adi Barchan Final project, autumn 2006
2
Goal The goal of this project is to recognize a given Electron-Configuration Graph, of a chemical matter. These graphs are in extensive use in chemistry studies, laboratories and textbooks. This project helps a Chemistry student to top-up his handwritten electron-configuration drawing abilities, and help him recognize different atom drawings.
3
The main problem: Drawing is handwritten => not very accurate and grid-aligned. The program also outputs these inaccuracies in the student's drawing.
4
Scientific introduction The electron configuration of an atom is the arrangement of the electrons in it's electron orbitals. These are the quantum states of an individual electron in the electron cloud. The electron configuration of an atom is the arrangement of the electrons in it's electron orbitals. These are the quantum states of an individual electron in the electron cloud. The orbitals are arranged in sub-shells, we call levels, which are numbered: 1s 2s 2p 3s 3p, etc. The orbitals are arranged in sub-shells, we call levels, which are numbered: 1s 2s 2p 3s 3p, etc.
5
orbital Level 4 (3s) Level 3 (2p) Level 2 (2s) Level 1 (1s) Level 5 (3p) Example of an electron configuration graph: (Limitations exist)
6
1. Each orbital hold a max of 2 electrons, in different spins 2. Levels will be filled in a bottom-up order (Level x will have no electrons, unless all previous levels are full) 3. The orbitals in a level are filled with electrons in a left-to-right order, and all orbitals must accommodate an electron before the first one can accommodate two. => 1-1 correlation between an atom of an element, and a configuration graph (drawing). Our program can thus return the atom of an input drawing.
7
The Algorithm The program asks the user to input a 1-bit Bitmap image for analyzing, i.e. a scanned drawing of an electron- configuration graph.
8
Stage I - Edge Detection of horizontal lines Using the Prewitt edge detector, we discover edge points along with the direction of the edge at each point. We then save only the points with a horizontal direction (0 or 180 ). (0 or 180 ). This stage reduces the effect of non-relevant items in the drawing (vertical lines etc.) and noise on the algorithm used in Stage II.
9
Stage II - Horizontal lines detection Horizontal lines detection using the Hough transform for linear lines. The transform is applied to the output of Stage I. As we are interested only in horizontal lines, we don't need the "a" (tangent) value of the line, but just the "b" (elevation) value. The following figure shows the original image, with the detected electron levels, i.e. non-adjacent horizontal lines
10
Stage III - Find centers of orbitals, using the K-Clustering algorithm We first need to segment the image into horizontal stripes, one for each level. According to Chemistry rules, each level has a known number of orbitals. This number is used as the "K", or the number of clusters to search for, in the K- Clustering algorithm. In the following image each section (horizontal stripe) is marked in a specific color, and the cluster- centers found by the algorithm are marked as red circles.
11
Stage IV - Segment image into small sub-images (of orbital) Each red circle is an approximation to the center of gravity of an orbital. Taking a rectangular window around each circle, will give us a sub-image, which will hopefully contain only the orbital. Here are a few examples of sub-images taken in this way:
12
Stage V – Detect and count vertical lines in each sub image As we have an algorithm for detecting horizontal lines, all we need to do is rotate by 90 and apply stages I and II, to each sub-image. The number of lines (electrons) detected in each sub-image (orbital) is saved in a simple data structure, a vector, for the next stage.
13
Stage VI – Approximate chemical element and report errors The approximation is done by calculating the distance between the result vector and the database. The closest element in the DB, and the distance from it, is plotted to the user. The approximation is done by calculating the distance between the result vector and the database. The closest element in the DB, and the distance from it, is plotted to the user. This distance represents the difference between the measured drawing and the approximated element: the smaller the distance, the closer the drawing is to this element. This distance represents the difference between the measured drawing and the approximated element: the smaller the distance, the closer the drawing is to this element. The norm for the distance calculation can be changed by the user. The norm for the distance calculation can be changed by the user.
16
Logical and Semantic errors in the drawing Number of levels Number of levels Distance between levels Distance between levels Aligned Columns Aligned Columns Correct distribution of electrons in the orbitals across the level Correct distribution of electrons in the orbitals across the level
17
Results & Conclusions The main stages of the algorithm work on most inputs. Problems arise in the vertical lines detection. Example of correct recognition Example of incorrect recognition
18
Another problem arises when the arrows are too tall, and so intrude into the image-strip of the above level, thus interfering with the K-Clustering algorithm
19
THE END….
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.