<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">JBiSE</journal-id><journal-title-group><journal-title>Journal of Biomedical Science and Engineering</journal-title></journal-title-group><issn pub-type="epub">1937-6871</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jbise.2017.105B001</article-id><article-id pub-id-type="publisher-id">JBiSE-76087</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Biomedical&amp;Life Sciences</subject></subj-group></article-categories><title-group><article-title>
 
 
  The Application of Visual Organization Principle in the Detection of Sleep Spindles
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Xuemei</surname><given-names>Jin</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Junzhong</surname><given-names>Zou</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Jian</surname><given-names>Zhang</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>East China University of Science and Technology, Shanghai, China</addr-line></aff><pub-date pub-type="epub"><day>10</day><month>05</month><year>2017</year></pub-date><volume>10</volume><issue>05</issue><fpage>1</fpage><lpage>9</lpage><history><date date-type="received"><day>January</day>	<month>8,</month>	<year>2017</year></date><date date-type="rev-recd"><day>Accepted:</day>	<month>May</month>	<year>3,</year>	</date><date date-type="accepted"><day>May</day>	<month>10,</month>	<year>2017</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
   
   In order to detect the sleep spindles simply and efficiently, a novel time-domain approach to detect sleep spindles based on the principles of visual organization is proposed. The code idea of the visual organization is to organize the primary visual elements according to some rules of organization, and to form a more meaningful object of visual processing, as the input of next process. After the collected EEG is processed with the merging algorithm based on the principle of visual organization, it can extract the time-domain feature frequency and duration time better. Use these features with a simple algorithm to detect spindles achieving sensitivity of 92.5% and specificity of 98.1%, which verifies the validity of this method to detect the sleep spindles. 
  
 
</p></abstract><kwd-group><kwd>Sleep Spindles</kwd><kwd> Principle of Visual Organization</kwd><kwd> Time-Domain Detection</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Sleep spindles (SS) generated from complex interactions between thalamic, limbic and cortical areas are the hallmarks of the non-REM stage 2 sleep (N2). They are sinusoidal spindle-like waveforms which have the characteristic of progressively increasing, then gradually decreasing lasting 0.5~3s with a frequency profile at 11 - 16 Hz. The figure characteristic of the waveforms is obvious [<xref ref-type="bibr" rid="scirp.76087-ref1">1</xref>].</p><p>Apart from being the characteristic wave of the sleep stage, sleep spindles also have great relationships with human activities. Studies [<xref ref-type="bibr" rid="scirp.76087-ref2">2</xref>] have founded that during sleep, the more sleep spindles exist, noises can be more tolerated and the deep sleep can be more easily kept. Moreover, they are known to play a fundamental role in memory consolidation during sleep [<xref ref-type="bibr" rid="scirp.76087-ref3">3</xref>], as well as being related to the secretion of melatonin that helps in maintaining the body’s circadian rhythms [<xref ref-type="bibr" rid="scirp.76087-ref4">4</xref>]. Therefore, detecting the sleep spindles rapidly and efficiently has a great value in physiological, pathological and pharmacological studies during sleep.</p><p>Detecting sleep spindles by man is a time-consuming and laborious work with many uncertainty factors and prone to human error. The study [<xref ref-type="bibr" rid="scirp.76087-ref5">5</xref>] has indicated the inter-rater variability in scoring them to be around 80%.</p><p>Since the EEG was first detected, scholars have applied various signal analysis methods to the EEG analysis. Time-domain method is one of the earliest methods to study EEG, which has the irreplaceable advantages. With the continuous development of the EEG study, analysis method has turned from the time-domain into the time of frequency-domain, time and frequency-domain and other nonlinear method. Gorur [<xref ref-type="bibr" rid="scirp.76087-ref6">6</xref>] used Short time Fourier transform for feature extraction. Both multilayer perceptron and support vector machine are utilized in detection of the spindles achieving a sensitivity of 88.7% and 95.4%. [<xref ref-type="bibr" rid="scirp.76087-ref7">7</xref>] used amplitude-frequency normal modelling and reported a sensitivity of 75.1%. [<xref ref-type="bibr" rid="scirp.76087-ref8">8</xref>] used bandpass filtering with thresholding, relative power and autoregressive modelling to achieve sensitivity and specificity values of 84.6% and 95.3%.</p><p>In this paper, the merging algorithm based on the principle of the visual organization was applied to process the rare sleep EEG and then according to the time-domain feature of sleep spindles to detect the sleep spindles, which can be automatically marked. The rest of paper is organized as follows: Section 2 and section 3 introduce the detection method and result, Section 4 shows the conclusion.</p></sec><sec id="s2"><title>2. Detection Method</title><sec id="s2_1"><title>2.1. Definition of Increasing and Decreasing Sequences</title><p>Define the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x1.png" xlink:type="simple"/></inline-formula> as the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x2.png" xlink:type="simple"/></inline-formula> th sample point in the sequence<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x3.png" xlink:type="simple"/></inline-formula>. In<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x4.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x5.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x6.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x7.png" xlink:type="simple"/></inline-formula> then <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x8.png" xlink:type="simple"/></inline-formula> is an increasing sequence. If<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x9.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x10.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x11.png" xlink:type="simple"/></inline-formula>and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x12.png" xlink:type="simple"/></inline-formula>, then <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x13.png" xlink:type="simple"/></inline-formula> is a decreasing sequence. The local maximum point is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x14.png" xlink:type="simple"/></inline-formula> and the local minimum point are <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x15.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x16.png" xlink:type="simple"/></inline-formula>. A new sequence <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x17.png" xlink:type="simple"/></inline-formula> is defined to mark these local minimum and maximum points, and let<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x18.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x19.png" xlink:type="simple"/></inline-formula>,<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x19.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x20.png" xlink:type="simple"/></inline-formula>.</p></sec><sec id="s2_2"><title>2.2. Merging Algorithm Based on the Principle of the Visual Organization</title><p>The concept of visual organization originates from cognitive psychology. The main research contents include: Gestalt perceptual organization principles [<xref ref-type="bibr" rid="scirp.76087-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.76087-ref10">10</xref>] [<xref ref-type="bibr" rid="scirp.76087-ref11">11</xref>], visual closure [<xref ref-type="bibr" rid="scirp.76087-ref12">12</xref>] and non-contingency principle [<xref ref-type="bibr" rid="scirp.76087-ref13">13</xref>] et al. visual organization algorithm is the method to make the basic image elements form an overall subject according to the quantitative model of Gestalt principle in a narrow sense. In a broad sense, algorithms that can achieve segmentation and clustering can be classified as the visual organization algorithm [<xref ref-type="bibr" rid="scirp.76087-ref14">14</xref>]. Visual organization method can solve the computer visual problem such as: contour extraction, image segmentation and object detection et al.</p><p>The merging algorithm based on the visual organization consists two parts. One of them is to merger the clutter waves. The amplitude of EEG for an adult is 10 uv - 50 uv. The merging clutters algorithm is to remove the EEG with amplitude below 10uv is meaningless. The other part of the merging algorithm is to merger incomplete waves. After merging, the render shape of EEG becomes more in line with the standards of human vision. According to the study of [<xref ref-type="bibr" rid="scirp.76087-ref15">15</xref>], 11 kinds of merging situation are presented in the <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p><p>(a) Merging clutters</p><p>Set <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x21.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x22.png" xlink:type="simple"/></inline-formula> represents sampling period. If<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x23.png" xlink:type="simple"/></inline-formula>, then drop the point<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x23.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x24.png" xlink:type="simple"/></inline-formula>, change the order of the remaining points. In this case <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x23.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x25.png" xlink:type="simple"/></inline-formula> is neither the local maximum nor the local minimum point. So the local maximum point should be recalculated, and if<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x23.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x26.png" xlink:type="simple"/></inline-formula>, set<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x23.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x27.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x23.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x28.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x22.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x23.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x29.png" xlink:type="simple"/></inline-formula>,……, the new sequence containing alternating local maximum and minimum points is formed. The results before and after merger are shown in <xref ref-type="fig" rid="fig2">Figure 2</xref>.</p><p>(b) Merging incomplete waves</p><p>The definition of complete waves and incomplete waves were proposed by Zhang [<xref ref-type="bibr" rid="scirp.76087-ref15">15</xref>] [<xref ref-type="bibr" rid="scirp.76087-ref16">16</xref>]. Set<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x30.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x31.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x32.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x32.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x33.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x32.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x33.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x34.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x32.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x33.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x34.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x35.png" xlink:type="simple"/></inline-formula>and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x31.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x32.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x33.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x34.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x35.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x36.png" xlink:type="simple"/></inline-formula>. If these points satisfy one or more following conditions, start the merging procedure in Section 2.2.1.</p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> Merger result: (a) the left and right waves both are incomplete, and they are merged; (b) the left and right waves both are incomplete, and they are merged; (c) the left and right waves both are incomplete, and they are merged; (d) the left is incomplete, the right is complete, and they can’t be merged; (e) the left is complete, the right is incomplete, and they can’t be merged; (f) the left and right are both incomplete, and they can’t be merged; (g) the left and right both are complete, and they can’t be merged; (h) the left is complete, the right is incomplete, when , they can be merged; (i) the left and right are both complete, when , they can’t be merged; (j) the left is incomplete, the right is complete, when, they can be merged; (k) the left and right are both completes, when , they can’t be merged</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/76087x37.png"/></fig><fig-group id="fig2"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> Merger examples, the left is the wave before, the right is after.</title></caption><fig id ="fig2_1"><label></label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/76087x38.png"/></fig><fig id ="fig2_2"><label></label><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/76087x39.png"/></fig></fig-group><p>(a) <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x40.png" xlink:type="simple"/></inline-formula>and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x40.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x41.png" xlink:type="simple"/></inline-formula>;</p><p>(b) <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x42.png" xlink:type="simple"/></inline-formula>and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x42.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x43.png" xlink:type="simple"/></inline-formula>;</p><p>(c) <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x44.png" xlink:type="simple"/></inline-formula>and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x45.png" xlink:type="simple"/></inline-formula>;</p><p>(d) <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x46.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x47.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x48.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x46.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x49.png" xlink:type="simple"/></inline-formula>;</p><p>(e) <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x50.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x51.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x51.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x52.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x51.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x52.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x53.png" xlink:type="simple"/></inline-formula>;</p><p>(f) <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x54.png" xlink:type="simple"/></inline-formula>or <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x55.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x55.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x56.png" xlink:type="simple"/></inline-formula> or<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x55.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x56.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x57.png" xlink:type="simple"/></inline-formula>.</p><p>It can be seen that r impacts the merging result directly. Zhang [<xref ref-type="bibr" rid="scirp.76087-ref15">15</xref>] [<xref ref-type="bibr" rid="scirp.76087-ref16">16</xref>] have compared the results when r was changed from 0.2 to 0.7, and found that r = 0.5 can be more adaptive to waves of different rhythm and different amplitude. So r = 0.5 is chosen in this experiment.</p><p>The <xref ref-type="fig" rid="fig4">Figure 4</xref> shows the single wave merger and the picture below presents a sample merger. The blue represents the rare EEG and the green represents the EEG after merger.</p></sec><sec id="s2_3"><title>2.3. Detection of Sleep Spindles</title><p>The core idea of this paper is to merger the rare EEG using the merger algorithm based on the principle of visual organization so that the time-domain feature of the waves can be more obvious. According to these features, the waves which meet the period condition of sleep spindles can be marked, and then combine these waves with same features, and last judge whether the duration time of the marked waves is meet the duration feature of sleep spindles.</p><p>(1) Detect the single wave that meets the period condition</p><p>The frequency range of sleep spindle is 11 - 16 Hz, so the period of the single wave is 0.07 - 0.085 s. In this paper, we take the period of 0.06 - 0.10 s as the period condition to detect sleep spindles. The wave that meets the condition is marked in red in the dashed box.</p><p>In the <xref ref-type="fig" rid="fig4">Figure 4</xref>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x58.png" xlink:type="simple"/></inline-formula>represents the location of the merger point in the waveform. The period (T) of the single wave after merger is calculated following the equation below:</p><disp-formula id="scirp.76087-formula1"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76087x59.png"  xlink:type="simple"/></disp-formula><p>In the Equation (1), <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x60.png" xlink:type="simple"/></inline-formula>represents sample frequency. Here the value of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x60.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x61.png" xlink:type="simple"/></inline-formula> is 100 Hz or 200 Hz. The wave with period in the range of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x60.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x61.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x62.png" xlink:type="simple"/></inline-formula> was marked in red. Shown in the <xref ref-type="fig" rid="fig4">Figure 4</xref>, “<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x60.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x61.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x62.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x63.png" xlink:type="simple"/></inline-formula>” is not in the range of period, so it</p><fig id="fig3"  position="float"><label><xref ref-type="fig" rid="fig3">Figure 3</xref></label><caption><title> Merger result in matlab</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/76087x64.png"/></fig><fig id="fig4"  position="float"><label><xref ref-type="fig" rid="fig4">Figure 4</xref></label><caption><title> Wave meets the period conditio</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/76087x65.png"/></fig><p>keeps it as it is. “<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x66.png" xlink:type="simple"/></inline-formula>” meets the period condition and the wave was marked in red.</p><p>(2) Merge the marked waves</p><p>After the filter of the period, the single waves meet condition would be marked in red. If the interval distance between two adjacent marked waves meets the threshold conditions, the two adjacent marked waves can be combined, which means the waves between two adjacent marked waves would be marked in red in the dashed box.</p><p>Shown as the <xref ref-type="fig" rid="fig5">Figure 5</xref>, the waves in red in dashed box represent the waves that meet the period condition, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x67.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x67.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x68.png" xlink:type="simple"/></inline-formula> represent the interval distance between the marked waves. Set <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x67.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x68.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x69.png" xlink:type="simple"/></inline-formula> as the interval distance, new sequence <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x67.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x68.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x69.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x70.png" xlink:type="simple"/></inline-formula> to record the location of the end point in an unmarked waveform and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x67.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x68.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x69.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x70.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x71.png" xlink:type="simple"/></inline-formula> to record the location of the front point in the unmarked waveform, and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x67.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x68.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x69.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x70.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x71.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x72.png" xlink:type="simple"/></inline-formula> represents the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x67.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x68.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x69.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x70.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x71.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x72.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x73.png" xlink:type="simple"/></inline-formula>th unmarked wave:</p><disp-formula id="scirp.76087-formula2"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76087x74.png"  xlink:type="simple"/></disp-formula><p>In the Equation (2), <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x75.png" xlink:type="simple"/></inline-formula>represents sample frequency. Here the value of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x75.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x76.png" xlink:type="simple"/></inline-formula> is 100 Hz or 200 Hz. <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x75.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x76.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x77.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x75.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x76.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x77.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x78.png" xlink:type="simple"/></inline-formula> record the end point and front point of the unmarked waves in the sample waveform. When <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x75.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x76.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x77.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x78.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x79.png" xlink:type="simple"/></inline-formula>meets the condition:<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x75.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x76.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x77.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x78.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x79.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x80.png" xlink:type="simple"/></inline-formula>, the waves would be marked in red.</p><p>The experimental results prove that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x81.png" xlink:type="simple"/></inline-formula> should equal 0.05. Shown in the <xref ref-type="fig" rid="fig5">Figure 5</xref>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x81.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x82.png" xlink:type="simple"/></inline-formula>meets the condition was marked in red, while <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x81.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x82.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x83.png" xlink:type="simple"/></inline-formula> does not meet the condition, shown as it was.</p><p>(3) Remove the marked waves that do not meet the duration time condition</p><p>By definition sleep spindles last 0.5 s - 3 s. The marked waves should meet the duration time condition. If so, the marked waves are sleep spindles or</p><fig id="fig5"  position="float"><label><xref ref-type="fig" rid="fig5">Figure 5</xref></label><caption><title> Merge of adjacent waves</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/76087x84.png"/></fig><p>they are not sleep spindles.</p><p>The EEG waves were processed by the above two steps, and the marked waves are shown in the <xref ref-type="fig" rid="fig6">Figure 6</xref>. <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x85.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x85.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x86.png" xlink:type="simple"/></inline-formula> represent the duration time of the marked waves. Set <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x85.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x86.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x87.png" xlink:type="simple"/></inline-formula> as duration time of marked waves, new sequence <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x85.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x86.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x87.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x88.png" xlink:type="simple"/></inline-formula> to record the location of the end point in an marked waveform and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x85.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x86.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x87.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x88.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x89.png" xlink:type="simple"/></inline-formula> to record the location of the front point in the marked waveform, and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x85.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x86.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x87.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x88.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x89.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x90.png" xlink:type="simple"/></inline-formula>represents the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x85.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x86.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x87.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x88.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x89.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x90.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x91.png" xlink:type="simple"/></inline-formula>th unmarked wave:</p><disp-formula id="scirp.76087-formula3"><label>(3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76087x92.png"  xlink:type="simple"/></disp-formula><p>In the Equation (3), <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x93.png" xlink:type="simple"/></inline-formula>represents sample frequency. Here the value of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x93.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x94.png" xlink:type="simple"/></inline-formula> is 100 Hz or 200 Hz. <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x93.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x94.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x95.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x93.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x94.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x95.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x96.png" xlink:type="simple"/></inline-formula> record the end point and front point of the marked waves in the sample waveform. When <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x93.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x94.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x95.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x96.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x97.png" xlink:type="simple"/></inline-formula> meets the condition:<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x93.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x94.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x95.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x96.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x97.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x98.png" xlink:type="simple"/></inline-formula>, the marked wave is not sleep spindle, and it should be removed the mark. Through calculation, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x93.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x94.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x95.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x96.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x97.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x98.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x99.png" xlink:type="simple"/></inline-formula>keeps it was and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x93.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x94.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x95.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x96.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x97.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x98.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x99.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x100.png" xlink:type="simple"/></inline-formula> remove the mark.</p></sec></sec><sec id="s3"><title>3. Results</title><p>The data used in this experiment is from 6 subjects’ whole-nights recording. Two of them are collected from the laboratory, the sampling frequency of which is 200 Hz and the other four is downloaded from MIT [<xref ref-type="bibr" rid="scirp.76087-ref17">17</xref>], the frequency of which is 100 Hz. A segment of 30 minutes was extracted from each night from the central EEG channel for spindles scoring. And set a sample length of 20 sec. In <xref ref-type="fig" rid="fig7">Figure 7</xref>, the fragment of the detection result is shown in the dashed box:</p><p>Among these:</p><p>The blue is the rare EEG signal, the green is the wave after merger and the red is the marked sleep spindles.</p><p>According to the assessment method of detecting sleep spindle proposed by [<xref ref-type="bibr" rid="scirp.76087-ref18">18</xref>], the number of false positive (FP), true positive (TP) and false negative (FN) is recorded. Taking the duration time of sleep spindles 2sec, we calculate the sensitivity and specificity according to the equations below and the results are shown in the <xref ref-type="table" rid="table1">Table 1</xref>:</p><disp-formula id="scirp.76087-formula4"><label>(4)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76087x101.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.76087-formula5"><label>(5)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76087x102.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.76087-formula6"><label>(6)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/76087x103.png"  xlink:type="simple"/></disp-formula><fig id="fig6"  position="float"><label><xref ref-type="fig" rid="fig6">Figure 6</xref></label><caption><title> Waves meet the duration time condition</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/76087x104.png"/></fig><fig id="fig7"  position="float"><label><xref ref-type="fig" rid="fig7">Figure 7</xref></label><caption><title> The detection result</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/76087x105.png"/></fig><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Detection result of sleep spindle</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >No.</th><th align="center" valign="middle" >Number of SS</th><th align="center" valign="middle" >Number of Tp</th><th align="center" valign="middle" >Sensitivity (%)</th><th align="center" valign="middle" >Specificity (%)</th></tr></thead><tr><td align="center" valign="middle" >1</td><td align="center" valign="middle" >151</td><td align="center" valign="middle" >141</td><td align="center" valign="middle" >93.3%</td><td align="center" valign="middle" >96.9%</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >57</td><td align="center" valign="middle" >50</td><td align="center" valign="middle" >87.7%</td><td align="center" valign="middle" >98.2%</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >64</td><td align="center" valign="middle" >59</td><td align="center" valign="middle" >92.1%</td><td align="center" valign="middle" >98.9%</td></tr><tr><td align="center" valign="middle" >4</td><td align="center" valign="middle" >47</td><td align="center" valign="middle" >43</td><td align="center" valign="middle" >91.4%</td><td align="center" valign="middle" >99.2%</td></tr><tr><td align="center" valign="middle" >5</td><td align="center" valign="middle" >58</td><td align="center" valign="middle" >55</td><td align="center" valign="middle" >94.8%</td><td align="center" valign="middle" >98.6%</td></tr><tr><td align="center" valign="middle" >6</td><td align="center" valign="middle" >133</td><td align="center" valign="middle" >124</td><td align="center" valign="middle" >93.2%</td><td align="center" valign="middle" >96.8%</td></tr><tr><td align="center" valign="middle" >total</td><td align="center" valign="middle" >510</td><td align="center" valign="middle" >472</td><td align="center" valign="middle" >92.5%</td><td align="center" valign="middle" >98.1%</td></tr></tbody></table></table-wrap><p>Seen from <xref ref-type="table" rid="table1">Table 1</xref>, the FP and FN exist. The main cause for FP is that the interval length between the marked waves whose duration time is less than 0.5secis lower than the threshold. They can’t form a wave whose duration time longer than 0.5 sec. In addition, the period of sleep spindle is about 0.06~0.10sec, so <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x106.png" xlink:type="simple"/></inline-formula> is the detection condition of sleep spindles. Some FPs’ period is just 0.06sec or 0.10sec.When the period condition changes into<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x106.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x107.png" xlink:type="simple"/></inline-formula>, the FP can be changed into TP. However, if to do so, the FNs would become more. Finally, we take the condition:<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x106.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x107.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/76087x108.png" xlink:type="simple"/></inline-formula>. The main cause for FN is that some waves whose period is not in the range 0.06~0.1 would be meet the period condition because of the process of merger algorithm. Meanwhile, the interval duration time is less than the set threshold, and they would become a waveform longer than 0.5sec. We can’t remove them using duration time condition.</p></sec><sec id="s4"><title>4. Concluding Remarks</title><p>This paper mainly introduces that the sleep spindles are detected by the time- domain feature in the EEG processed by the merger algorithm based on the principle of visual organization. Experiment results show that after the introduction of merging algorithm, it is feasible to combine the single wave into a spindle through the organizational rules, and are close to the visual result. To detect the spindles using time-domain features is simple, efficient and very intuitive. The detection result is also good. Of course, this method also has some limitations. When the experimental object is the patient, there will be more leakage. By analysis, the threshold for the experiments is fixed value for the training set of normal sleep data. When the data is from patients’ night sleep, the threshold is not the optimal value, and the waveform cannot be combined into the waveform with the duration of more than 0.5 sec. It does not meet the conditions of duration time. Therefore, the next stage of work is the optimization of the threshold parameters, so that the detection method can be used in different subjects.</p></sec><sec id="s5"><title>Cite this paper</title><p>Jin, X.M., Zou, J.Z. and Zhang, J. (2017) The Application of Visual Organization Principle in the Detection of Sleep Spindles. J. Biomedical Science and Engineering, 10, 1-9. https://doi.org/10.4236/jbise.2017.105B001</p></sec></body><back><ref-list><title>References</title><ref id="scirp.76087-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">De, G.L. and Errara, M.F. (2003) Sleep Spindles: An Overview. Sleep Medicine Reviews, 7, 423-440. http://dx.doi.org/10.1053/smrv.2002.0252.</mixed-citation></ref><ref id="scirp.76087-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Vu, D.T.T., Mckinney, S.M, Buxton, O.M., et al. (2010) Spontaneous Brain Rhythms Predict Sleep Stability in the Face of Noise. Current Biology Cb, 20, 626-627.  
http://dx.doi.org/10.1016/j.cub.2010.06.032</mixed-citation></ref><ref id="scirp.76087-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Fogel, S.M. and Smith, C.T. (2010) The function of the Sleep Spindle: A Physio-logical Index of Intelligence and a Mechanism for Sleep-Dependent Memory Consolidation. Neuroscience and Biobehavioral Reviews, 35, 1154-1165. 
http://dx.doi.org/10.1016/j.neubiorev.2010.12.003</mixed-citation></ref><ref id="scirp.76087-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Forest, G., Poulin, J., Daoust, A.M., etal. (2007) Attention and non-REM sleep in Neuroleptic-Naive Persons with Schizophrenia and Control Participants. Psychiatry Research, 149, 33-40. http://dx.doi.org/10.1016/j.psychres.2005.11.005</mixed-citation></ref><ref id="scirp.76087-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Campbell, K. and Hofman W. (1980) Human and Automatic Validation of a Phase-Locked Loop Spindle Detection System. Electroencephalography &amp; Clinical Neurophysiolgy, 48, 671-674. http://dx.doi.org/10.1016/0013-4694(80)90296-5</mixed-citation></ref><ref id="scirp.76087-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Gorur, D., Halici, U., Aydin, H., et al. (2002) Sleep Spindles Detection Using Short Time Fourier Transform and Neural Networks. Neural Networks, IJCNN '02. Proceedings of the 2002 International Joint Conference on. IEEE, 1631-1636.  
http://dx.doi.org/10.1109/IJCNN.2002.1007762</mixed-citation></ref><ref id="scirp.76087-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Nonclercq, A., Urbain, C., Verheulpen, D., etal. (2013) Sleep Spindle Detection through Amplitude–Frequency Normal Modelling. Journal of Neuroscience Methods, 214, 192-203. http://dx.doi.org/10.1016/j.jneumeth.2013.01.015</mixed-citation></ref><ref id="scirp.76087-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Wendt, S.L., Christensen, J., Kempfner, J., etal. (2012) Validation of a Novel Automatic Sleep Spindle Detector with High Performance during Sleep in Middle Aged Subjects. International Conference of the IEEE Engineering in Medicine &amp; Biology Society. Conference Proceedings IEEE EngMedBiolSoc, 4250-4253.  
http://dx.doi.org/10.1109/EMBC.2012.6346905</mixed-citation></ref><ref id="scirp.76087-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Luo, S.W. (2006) Visual Perception System Information Processing Theory. Beijing: Electronics Industry Press.</mixed-citation></ref><ref id="scirp.76087-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Ben-Av, M.B. and Sagi, D. (1995) Perceptual Grouping by Similarity and Proximity: Expe-rimental Results Can Be Predicted by Intensity Autocorrelations. Vision Research, 35, 853-866. http://dx.doi.org/10.1016/0042-6989(94)00173-J.</mixed-citation></ref><ref id="scirp.76087-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Mack, A., Tang, B., Tuma, R., etal. (1992) Perceptual organization and atten-tion..Cognitive Psychology, 24, 475-501.  
http://dx.doi.org/10.1016/0010-0285(92)90016-U</mixed-citation></ref><ref id="scirp.76087-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Ffytche, D. (1999) Review of High-level vision: Object recognition and Visual Cognition. Optical Engineering, 20, 231-256.  
http://dx.doi.org/10.1027//0269-8803.13.3.200</mixed-citation></ref><ref id="scirp.76087-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Han, S., Song, Y., Ding, Y., et al. (2001) Neural Substrates for Visual Perceptual Grouping in Humans. Psychophysiology, 38, 926-35.  
http://dx.doi.org/10.1111/1469-8986.3860926</mixed-citation></ref><ref id="scirp.76087-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Luo, S.W. (2010) Visual Cognitive Computing Theory. Beijing: Science Press, 2010.</mixed-citation></ref><ref id="scirp.76087-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, J., Zou, J., Wang, M., et al. (2013) Automatic Detection of Interictal Epileptiform Discharges Based on Time-Series Sequence Merging Method. Neurocomputing, 110, 35-43. http://dx.doi.org/10.1016/j.neucom.2012.11.017</mixed-citation></ref><ref id="scirp.76087-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Wei, Z., Zou, J. and Zhang, J. (2016) Automatic Recognition of Chewing Noises in Epileptic EEG Based on Period Segmentation.Neurocomputing, 190, 107-116.  
http://dx.doi.org/10.1016/j.neucom.2016.01.029</mixed-citation></ref><ref id="scirp.76087-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Kemp, B., Zwinderman, A.H., Tuk, B., etal. (2000) Analysis of a Sleep-Dependent Neuronal Feedback Loop: The Slow-wave Microcontinuity of the EEG.IEEE Transactions on Biomedical Engi-neering, 47, 1185-119.  
http://dx.doi.org/10.1109/10.867928</mixed-citation></ref><ref id="scirp.76087-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Devuyst, S., Dutoit, T., Stenuit, P., etal. (2011) Automatic sleep spindles detec-tion--overview and development of a standard proposal assessment method. Conference: International Conference of the IEEE Engi-neering in Medicine &amp; Biology Society IEEE Engineering in Medicine &amp; Biology Society Conference. Conference Proceedings IEEE Eng Med BiolSoc, 1713-1716. 
http://dx.doi.org/10.1109/IEMBS.2011.6090491</mixed-citation></ref></ref-list></back></article>