?

基于機器視覺的魚類模式生物在線監測技術方法研究

2016-12-06 06:11周振宇,邵振洲,施智平
生態毒理學報 2016年1期
關鍵詞:胸鰭魚鰓尾鰭

基于機器視覺的魚類模式生物在線監測技術方法研究

水質的生物式監測方法靈敏度強,適應性廣,能夠適應于多種場合的水質監測工作并廣泛地應用在水環境的質量檢測和水質安全預警中,它能夠彌補理化監測方法實時性和綜合性較差的缺點,能夠產生巨大的社會和經濟效益[1]。其基本原理是利用水生生物個體、種群的健康狀態、生理特征、運動特征等的變化來指示水體環境質量的變化,表征環境污染狀況,從生物學角度為水體環境質量監測和評價提供依據[2-3]。

魚類是最早運用的模式生物。隨著機器視覺技術的不斷成熟和廣泛應用,視覺輔助的水質自動監測成為一種可能。這種非接觸式的監測手段的優勢是無需破壞魚類的正常生活環境,在自然狀態下觀測魚類的生理特征和運動特性。魚所表現出來的“逃避”、“呼吸加快”等異常行為顯然要遠遠提前于生物的病理損傷或死亡,為水環境的在線生物監測技術的有效性提供有力的理論支持。通過利用機器視覺方法,目前國內研究大部分僅將魚類的一部分運動特征(魚類的游動速度、游動加速度、游動高度、轉彎次數)為指標應用在水質監測中[4-21],缺少對胸鰭、尾鰭運動等信息的統計,也缺少生理特征方面(呼吸頻率、呼吸深度等)的重要信息。這使得在一定程度上的局限了觀測數據的完整性,也勢必會降低水質監測的準確性。

本文以青鳉魚為模式生物,在機器視覺的基礎上,實時監控魚的胸鰭、尾鰭擺動頻率,魚的呼吸頻率、呼吸深度,達到獲得更有魯棒性、健碩性的觀測數據。

1 青鳉魚生理特征檢測方法(The detection method of medaka physiological characteristics)

魚鰓的呼吸對污染物質十分敏感,對于半致死濃度的污染物在30 min內便可被檢測到,亞致死的污染物也可在24 h內被檢測出。在有污染物存在的情況下,魚鰓的呼吸會極速加快,并且變得無規律。Gerhardt等[21]將監測電極直接安裝在魚鰓上,監視當前呼吸頻率,分析數據并與正常的呼吸頻率相比較,以判斷水是否被污染。Cairns等[22]在水箱中插入網電極,通過注入電極的信號來記錄魚的呼吸運動。這2種方法雖然能一定程度地反映魚的真實生理狀況,然而無法排除裝置本身對魚類反應的影響且得到的信號往往十分微弱,不直觀,容易形成較大的識別誤差。

基于視覺的方法是以非接觸式的監測手段,通過電荷耦合器件(charge coupled device,CCD)相機在自然狀態下觀測魚類的生理特征和行為特性。本文通過分析青鳉魚魚鰓部位像素信息統計得到結果“顏色分布規律表(CDT)”,如表1所示。再結合機器學習算法中的線性分類器SVM(支持向量機),可準確定位得到青鳉魚魚鰓區域,實驗結果如圖1和2所示。其中SVM分類器是由顏色空間轉換后分別得到的S(HSV)通道、a(Lab)通道組合成的特征向量訓練得來。

表1 顏色分布規律表Table 1 The color distribution table

圖1 顏色分布規律表(CDT)和支持向量機(SVM)Fig.1 The color distribution table(CDT)&support vector machine(SVM)

圖2 青鳉魚魚鰓提取實驗結果Fig.2 Experiment result of extracting gill of medaka fish

根據魚鰓輪廓,我們可以計算其輪廓面積。在時間T內魚的呼吸次數n可根據魚鰓輪廓面積在時間T內的極大(小)值的個數來統計。青鱂魚的呼吸頻率f可由式(1)得出。

式中,n表示時間T內魚的呼吸次數,A表示魚鰓的輪廓面積。

2 青鳉魚運動特征檢測方法(The detection method of medaka motion features)

本文通過對運動魚進行骨架提取,進而通過提出青鳉魚骨架模型,可實時計算得到青鳉魚胸鰭尾鰭擺動頻率。

2.1 骨架提取

中軸變換(MAT)是一種用來確定物體、估計物體骨架的細化技術。理論上說,每個骨架點保持了與邊界點距離最小的性質,所以如果用以每個骨架點為中心的圓的集合,就可以恢復出原始的區域。具體就是以每個骨架點為圓心,以前述最小距離為半徑做圓。它們的包絡就構成了區域的邊界,填充圓就得到這些區域。由上述可知,骨架就是用1個點與1個點集的最小距離來定義的,可寫成式(3):

式中,B為邊界,z為邊界點,p為區域上任意一點。

在去噪后進行骨架提取,最終得到單一的較為完整的魚體骨架結構。圖3為經過骨骼細化后,以及鏈接了斷裂連通域后得到的青鏘魚魚骨架。該骨架與青鏘魚的整體狀態保持一致,對之后采集相應的數據起著關鍵的作用。

圖3 青鳉魚骨架提取結果Fig.3 Experiment result of skeleton extraction of medaka fish

圖4 青鳉魚骨架模型Fig.4 The skeleton model of medaka fish

2.2 青鳉魚骨架模型

本文提出了青鳉魚骨架模型如圖4,并標定了6個關鍵點分別為:胸鰭參考點、胸鰭根部參考點、胸鰭末梢端點、魚尾參考點1、魚尾參考點2和魚尾端點,以便于計算得到青鏘魚的胸鰭、尾鰭擺動頻率和幅值。胸鰭參考點以青鏘魚魚鰓與骨架的1個交點為參考點,該點具有較好的穩定性,可以適合作為參考點。得到參考點的同時,還能去除頭部無用的并可能會產生干擾的信息。其余各點以胸鰭參考點為初始點,遍歷整個魚骨架,從而先后得胸鰭根部端點、胸鰭末梢端點、魚尾端點。結果顯示如圖5所示。

2.3 青鳉魚運動特征計算

對于胸鰭擺動角度的計算,通過胸鰭參考點、胸鰭根部端點、胸鰭末點3點利用公式(4):

可以得到擺動角度θ,式中x為橫坐標,y為縱坐標,進而利用公式(5):

可以判斷出是左胸鰭還是右胸鰭的擺動角度。同理,對于青鏘魚魚尾擺動角度,也可以據此方法得出。進而通過統計一段時間T內,擺動角度的的峰值數量,可統計出擺動次數n。青鳉魚胸鰭和尾鰭擺動頻率計算方程如式(6):

圖5 青鳉魚骨架參考點Fig.5 The skeleton reference point of medaka fish

其中θimax和θimin為某個周期i內,青鳉魚胸鰭、尾鰭的最大擺動角度和最小擺動角度。

3 實驗結果與分析(Experimental results and analysis)

為驗證本文方法的有效性與可行性,做了如下實驗。實驗過程采用數碼攝像頭獲取正常水質下的魚體運動視頻圖像,每幀圖像大小為480×640,幀率為30 fps。

通過實驗結果可得,CDT&SVM方法檢測得到的青鳉魚呼吸次數與實際青鳉魚呼吸次數誤差較小,并且對于幀率為30 fps的CCD相機的實時采集,算法能滿足實時性。實驗在連續1 000幀圖像中得到的青鳉魚呼吸深度譜圖結果如圖6所示:

圖6 青鳉魚呼吸深度譜圖Fig.6 Spectrum of respiratory depth of medaka fish

青鳉魚胸鰭尾鰭擺動頻率實驗結果如表3所示,其中通過算法檢測得到的尾鰭擺動數據準確性較高。相較而言,由于青鳉魚胸鰭很難被準確識別,從而導致胸鰭擺動數據的準確性仍不夠準確。算法具有較好的實時性,單幀耗時約23 ms,能滿足在線采集、分析的需求。

實驗在連續1 000幀圖像中得到的青鳉魚胸鰭、尾鰭擺幅如圖7~9所示。

表2 青鳉魚呼吸頻率實測結果Table 2 Experiment result of medaka respiratory rate

表3 青鳉魚胸鰭尾鰭擺動頻率實測結果Table 3 Experiment result of medaka pectoral fins and tail beat frequency

圖7 青鳉魚尾鰭擺幅譜圖Fig.7 Spectrum of tail swinging amplitude of medaka fish

圖8 青鳉魚胸鰭(左側)擺幅譜圖Fig.8 Spectrum of left pectoral fin swinging amplitude of medaka fish

圖9 青鳉魚胸鰭(右側)擺幅譜圖Fig.9 Spectrum of right pectoral fin swinging amplitude of medaka fish

綜上所述,本文所提出的對青鳉魚的實時在線監測方法,充分的利用了機器視覺的優點,在準確監測青鳉魚的運動、生理特征的基礎上,仍能保持實時性,滿足了在線監測的需求,也能為生物水質監測和預警的發展提供一定支持與參考。

[1]徐建瑜,崔紹榮,苗香雯,等.計算機視覺技術在水產養殖中的應用與展望[J].農業工程學報,2005,21(8): 174-178 Xu J Y,Cui S R,Miao X W,et al.Application and prospect of computer vision technology in aquaculture[J]. Transactions of the Chinese Society of Agricultural Engineering,2005,21(8):174-178(in Chinese)

[2]Heinz G H,Haseltine S D.Avoidance behaviour of young black ducks treated with chromium[J].Toxicology Letters,1981(8):307-310

[3]Steiner U K.Linking antipredator behaviour,ingestion, gut evacuation and costs of predator induced responses in tadpoles[J].Animal Behaviour,2007,74(5):1473-1479

[4]Nimkerdphol K,Nakagawa M.Effect of sodium hypochlorite on zebrafish swimming behavior estimated by fractal dimension analysis[J].Journal of Bioscience and Bioengineering,2008,105(5):486-492

[5]Hughes N F,Kelly L H.New techniques for 3D video tracking of fish swimming movements in still or flowing water[J].Canadian Journal of Fisheries and Aquatic Sciences,1996,53:2476-2483

[6]耿彩英.用于水質監測的活體魚視頻圖像理解[D].杭州:杭州電子科技大學,2009:12 Geng C Y.The video image understanding of live fish used for water quality monitoring[D].Hangzhou:Hangzhou Dianzi University,2009:12(in Chinese)

[7]Zhu L Q,Weng W.Catadioptric stereo-vision system for the real-time monitoring of 3D behavior in aquatic animals[J].Physiology&Behavior,2007,91:106-119

[8]Wu G H,Yang Y,Zeng L J.Novel method based on video tracking system for simultaneous measurement of kinematics and flow in the wake of a freely swimming fish [J].Review of Scientific Instruments,2006,77:114302

[9]Wu G H,Zeng L J.Video tracking method for three-dimensional measurement of a free-swimming fish[J].Science in China Series G-Physics and Astronomy,2007,50: 779-786

[10]王麗娜.基于動態圖像理解的水質生物監測系統研究與應用[D].杭州:杭州電子科技大學,2011:1 Wang L N.Research and application on water quality biomonitoring system based on dynamic image understand-ing[D].Hangzhou:Hangzhou Dianzi University,2011:1 (in Chinese)

[11]胡江龍.多目標跟蹤算法在水質監測中的應用[D].杭州:杭州電子科技大學,2012:5 Hu J L.Water quality monitoring using multi-object tracking algorithm[D].Hangzhou:Hangzhou Dianzi University,2012:5(in Chinese)

[12]馬欣.生物式水質監測的報警方法研究[D].杭州:杭州電子科技大學,2012:3 Ma X.Research on alarming method of biological watermonitoring[D].Hangzhou:Hangzhou Dianzi University, 2012:3(in Chinese)

[13]Wu J,Xiao G,Zhang Y L,et al.Fish group tracking based on delaunay triangulation network[C].2011 4th International Congress on Image and Signal Processing (CISP),2011:534-537

[14]吳軍.基于視覺感知的魚群目標檢測與跟蹤技術研究[D].杭州:浙江工業大學,2011:4 Wu J.Research on detecting and tracking of fish group based on machine vision[D].Hangzhou:Zhejiang University of Technology,2011:4(in Chinese)

[15]于欣,侯曉嬌,盧煥達,等.基于光流法與特征統計的魚群異常行為檢測[J].農業工程學報,2014,30(2):162-168 Yu X,Hou X J,Lu H D,et al.Anomaly detection of fish school behavior based on features statistical and optical flow methods[J].Transactions of the Chinese Society of Agricultural Engineering,2014,30(2):162-168(in Chinese)

[16]Pinkiewicz T H,Purser G J,Williams R N.A computer vision system to analyse the swimming behavior of farmed fish in commercial aquaculture facilities:A case study using cage-held Atlantic salmon[J].Aquacultural Engineering,2011,45:20-27

[17]Lee J H,Wu M Y,Guo Z C.A tank fish recognition and tracking system using computer vision techniques[C]. Computer Science and Information Technology,2010,4: 528-532

[18]Serra-Toro C,Montoliu R,Traver V J,et al.Assessing water quality by video monitoring fish swimming behavior[C].20th International Conference on Pattern Recognition(ICPR),2010,8:23-26

[19]Christodoulou L,Kasparis T,Marques O.Advanced statistical and adaptive threshold techniques for moving object detection and segmentation[C].Digital Signal Processing(DSP),17thInternational Conference,2011:1-6

[20]Tan J S,Chang T K,Ooi P L,et al.Fast and robust zebrafish segmentation and detection algorithm under different spectrum conditions[C].Sensors Applications Symposium(SAS),2014:189-194

[21]Gerhardt A,Janssens D B L,Mo Z,et al.Short-term responses ofOryzias latipes(Pisces:Adrianichthyidae)and Macrobrachium nipponense(Crustacea:Palaemonidae)to municipal and pharmaceutical waste water in Beijing,China:Survival,behaviour,biochemical biomarkers[J]. Chemosphere,2002,47(1):35-47

[22]Cairns Jr J,Thompson K W,Hendricks A C.Effects of fluctuating sublethal applications of heavy metal solutions upon the gill ventilatory response of blue gills(Lepomis macrochirus)[M].Duluth,Minn.,Cincinnati,Ohio:U.S. Environmental Protection Agency,Research and Development,Environmental Research Laboratory,Center for Environmental Research Information,1981

quality monitoring provides a novel solution in this field.The water quality is detected by the biological response to reflect the direct or indirect pollution.However,the observation indexes and quantitative criteria are major problems to estimate in the complex water environment.In this paper,the medaka fish is chosen as the model organism,and the corresponding physiological characteristics and movement characteristics are observation indexes,such as breathing frequency,pectoral oscillation frequency,tail beat frequency,etc.By adopting machine vision based method,the real-time monitoring and analysis are achieved.Experimental results show that the proposed method can provide the support and reference for the development of biological water quality monitoring and early warning.The measured breathing frequency of medaka fish was 3.06 Hz,the pectoral oscillation frequency was 4.83 Hz and the tail beat frequency was 5.08 Hz.The results are consistent with the actual indexes.

biological water quality monitoring;real time;observation index

簡介:張融(1971—),女,工程師,主要研究方向為環境工程、工業設計。

饒凱峰(1976—),男,助理研究員,研究方向為水生態毒理與監測預警。

猜你喜歡
胸鰭魚鰓尾鰭
蝠鲼過濾海水有妙招
那么多海蚌一起游,一起流淚
塘養建鯉背鰭、尾鰭和腹鰭指數的線性體重表征
仿生胸鰭的三維尾渦結構與參數影響分析
快速取魚鰓器
基于CFX的仿生魚尾擺動水動力仿真及優化
金魚如何辨雌雄
機器鱈魚胸鰭/尾鰭協同推進直線游動動力學建模與實驗研究
“水中飛鳥”:豹魴鮄
形狀記憶合金絲驅動的仿生雙尾鰭推進器的仿真和實驗研究
91香蕉高清国产线观看免费-97夜夜澡人人爽人人喊a-99久久久无码国产精品9-国产亚洲日韩欧美综合