[go: up one dir, main page]

TWI645176B - Threshold determining method, image processing method and image processing device - Google Patents

Threshold determining method, image processing method and image processing device Download PDF

Info

Publication number
TWI645176B
TWI645176B TW104122067A TW104122067A TWI645176B TW I645176 B TWI645176 B TW I645176B TW 104122067 A TW104122067 A TW 104122067A TW 104122067 A TW104122067 A TW 104122067A TW I645176 B TWI645176 B TW I645176B
Authority
TW
Taiwan
Prior art keywords
value
image
image processing
pixel
frequency
Prior art date
Application number
TW104122067A
Other languages
Chinese (zh)
Other versions
TW201617599A (en
Inventor
藤本博己
Original Assignee
日商斯克林集團公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日商斯克林集團公司 filed Critical 日商斯克林集團公司
Publication of TW201617599A publication Critical patent/TW201617599A/en
Application granted granted Critical
Publication of TWI645176B publication Critical patent/TWI645176B/en

Links

Classifications

    • CCHEMISTRY; METALLURGY
    • C12BIOCHEMISTRY; BEER; SPIRITS; WINE; VINEGAR; MICROBIOLOGY; ENZYMOLOGY; MUTATION OR GENETIC ENGINEERING
    • C12MAPPARATUS FOR ENZYMOLOGY OR MICROBIOLOGY; APPARATUS FOR CULTURING MICROORGANISMS FOR PRODUCING BIOMASS, FOR GROWING CELLS OR FOR OBTAINING FERMENTATION OR METABOLIC PRODUCTS, i.e. BIOREACTORS OR FERMENTERS
    • C12M1/00Apparatus for enzymology or microbiology
    • C12M1/34Measuring or testing with condition measuring or sensing means, e.g. colony counters
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/27Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands using photo-electric detection ; circuits for computing concentration
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/48Biological material, e.g. blood, urine; Haemocytometers
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing

Landscapes

  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Biochemistry (AREA)
  • Analytical Chemistry (AREA)
  • Wood Science & Technology (AREA)
  • Biotechnology (AREA)
  • Organic Chemistry (AREA)
  • Zoology (AREA)
  • Biomedical Technology (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Medicinal Chemistry (AREA)
  • Theoretical Computer Science (AREA)
  • Sustainable Development (AREA)
  • General Engineering & Computer Science (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Microbiology (AREA)
  • Mathematical Physics (AREA)
  • Molecular Biology (AREA)
  • Urology & Nephrology (AREA)
  • Hematology (AREA)
  • Genetics & Genomics (AREA)
  • Food Science & Technology (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Investigating Or Analysing Biological Materials (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)
  • Apparatus Associated With Microorganisms And Enzymes (AREA)
  • Measuring Or Testing Involving Enzymes Or Micro-Organisms (AREA)

Abstract

本發明之圖像處理裝置具備:圖像取得構件1,其取得對已染色之細胞進行拍攝所得之原圖像;圖像處理構件2,其對原圖像中之已染色之染色區域與未染色之非染色區域實施互不相同之圖像處理;及輸出構件3,其輸出藉由圖像處理構件2而獲得之處理結果;且圖像處理構件2求出構成原圖像之各像素之像素值之頻度分佈,特定出與頻度分佈對應之頻佈圖之波峰及波谷,將與波谷之中、相對於在頻佈圖中夾著該波谷之2個波峰而言之該波谷之深度最大的一個波谷之位置對應之像素值作為臨限值,而將原圖像區分為染色區域與非染色區域。 An image processing device according to the present invention includes: an image acquisition unit 1 that acquires an original image obtained by imaging a stained cell; and an image processing member 2 that dyes the dyed region in the original image and The dyed non-stained areas are subjected to image processing different from each other; and the output member 3 outputs the processing result obtained by the image processing unit 2; and the image processing unit 2 obtains each pixel constituting the original image. The frequency distribution of the pixel values specifies the peaks and troughs of the frequency distribution map corresponding to the frequency distribution, and the depth of the trough is the largest among the troughs and the two peaks sandwiching the trough in the frequency distribution diagram. The pixel value corresponding to the position of one trough is used as a threshold, and the original image is divided into a dyed area and a non-stained area.

Description

臨限值決定方法、圖像處理方法及圖像處理裝置 Threshold determining method, image processing method and image processing device

本發明係關於一種對拍攝已染色之細胞所得之原圖像設定像素值之臨限值,而區別已染色之區域與未染色之區域之技術。 The present invention relates to a technique for setting a threshold value of a pixel value for an original image obtained by photographing a stained cell, and distinguishing between a dyed region and an undyed region.

於使用有於培養平皿或碟盤(培養皿)對細胞進行二維培養(亦稱為單層培養)所得之試樣之實驗、研究中,為獲知細胞之生長狀態,而對試樣進行染色。藉由對存在細胞之區域選擇性地染色,可獲知細胞之分佈狀況。 In the experiment and study using a sample obtained by two-dimensionally culturing a cell (also referred to as a monolayer culture) on a culture plate or a dish (culture dish), the sample is dyed in order to know the growth state of the cell. . The distribution of cells can be known by selective staining of cells present in the cells.

追求一種藉由基於構成圖像之各像素之像素值之圖像處理,自以該方式被染色之試樣之圖像自動區別已染色之區域與未染色之區域之技術之確立。於例如日本專利特開2009-210409號公報所記載之技術中,作為決定用以區別已染色之間質區域與未染色之背景區域之像素值之臨限值之方法,可使用Kittler之判別分析法及大津之判別分析法。此外,作為用以將圖像二值化之技術,自先前便已知有P-tile法(p分位數法)及Mode法等。 The pursuit of a technique for automatically distinguishing between a dyed region and an undyed region from an image of a sample dyed in this manner by image processing based on pixel values of pixels constituting the image is pursued. In the technique described in Japanese Laid-Open Patent Publication No. 2009-210409, for example, a method for determining the threshold value for distinguishing the pixel values of the dyed inter-substrate region from the undysed background region can be analyzed using Kittler's discriminant analysis. Discriminant analysis method of Law and Otsu. Further, as a technique for binarizing an image, a P-tile method (p-quantile method), an Mode method, and the like have been known from the past.

細胞之生長狀態視培養條件而各式各樣,故而於圖像中已染色之區域所占比率於0%至100%之間視試樣而大幅變化。又,視細胞本 身之色彩及染色之狀態等,已染色之區域之圖像濃度亦不相同。由於該原因,於上述各種先前技術中存在無法確實地將染色區域與非染色區域區別開來之情況。特別地,於染色區域或非染色區域中之某一者佔據圖像之大部分之情形時,存在基於已設定之臨限值之區分並不符合藉由專家之肉眼觀察所做出之判斷之情況。 The growth state of the cells varies depending on the culture conditions, so that the ratio of the dyed regions in the image varies greatly from 0% to 100% depending on the sample. Again, depending on the cell The image density of the dyed area is also different depending on the color of the body and the state of the dyeing. For this reason, in the various prior art described above, there is a case where the dyed region and the non-stained region cannot be surely distinguished. In particular, when one of the dyed area or the non-stained area occupies most of the image, there is a distinction based on the set threshold that does not meet the judgment made by the expert's naked eye observation. Happening.

本發明係鑒於上述課題而完成者,其目的在於提供一種藉由適當地設定像素值之臨限值,可一面降低給用戶帶來之不適感,一面區別已染色之區域與未染色之區域之技術。 The present invention has been made in view of the above problems, and an object of the present invention is to provide a boundary between a dyed region and an undyed region while reducing the uncomfortable feeling to the user by appropriately setting the threshold value of the pixel value. technology.

本發明之一態樣係一種臨限值決定方法,其自對已染色之細胞進行拍攝所得之原圖像,決定用以區別已染色之染色區域與未染色之非染色區域之像素值之臨限值;且為達成上述目的,具備:取得上述原圖像之步驟;求出構成上述原圖像之各像素之像素值之頻度分佈之步驟;特定出與上述頻度分佈對應之頻佈圖中之波峰及波谷之步驟:以及將與上述波谷之中、相對於在上述頻佈圖中夾著該波谷之2個上述波峰而言之該波谷之深度最大的一個波谷之位置對應之像素值設定為上述臨限值之步驟。 One aspect of the present invention is a method for determining a threshold value, which is determined from the original image obtained by photographing the stained cells, and is used to distinguish the pixel values of the dyed stained region from the unstained non-stained region. a limit value; and in order to achieve the above object, comprising: a step of obtaining the original image; a step of determining a frequency distribution of pixel values of each pixel constituting the original image; and specifying a frequency distribution map corresponding to the frequency distribution a step of peaks and troughs: and setting a pixel value corresponding to a position of a trough in which the depth of the trough is the largest among the above-mentioned troughs with respect to the two peaks sandwiching the trough in the above-mentioned frequency map The steps for the above threshold.

於包含染色區域與非染色區域之圖像中,期待於關於構成圖像之各像素之像素值而製作之頻佈圖中,出現與染色區域及非染色區域各者對應之2個主要波峰,即頻佈圖具有雙峰性。然而,如上所述,染色區域、非染色區域均係圖像濃度未必一樣,由於該原因於頻佈圖出現3個以上波峰之情況亦較多。特別地於染色區域佔據圖像之大部分之情形時,像素值之不均變得更加明顯,產生多個波峰及波谷。上述先前技術無法應付此種狀況。 In the image including the dyed area and the non-stained area, two main peaks corresponding to each of the dyed area and the non-stained area appear in the frequency layout prepared for the pixel values of the pixels constituting the image. The instant layout has bimodality. However, as described above, the image density is not necessarily the same in both the dyed region and the non-stained region, and for this reason, there are many cases in which three or more peaks appear in the frequency layout. Especially when the dyed area occupies most of the image, the unevenness of the pixel values becomes more pronounced, resulting in a plurality of peaks and troughs. The above prior art cannot cope with this situation.

可認為當於頻佈圖中存在複數個波谷時,其中任一個均與區分染色區域與非染色區域之臨限值對應。從而評價各波谷之有意義性可考慮用以找出適當之臨限值之方法。於本發明中,評價自夾著各波谷 之2個波峰觀察之該波谷之深度,與最深波谷對應之像素值被視為用以區分染色區域與非染色區域之臨限值。根據本案發明者之見解,當基於以此方式決定之臨限值將原圖像區分為染色區域與非染色區域時,可獲得專家看來亦無不適感之結果。 It can be considered that when there are a plurality of troughs in the frequency layout, any one of them corresponds to the threshold value of the distinguishing dyed area and the non-stained area. To evaluate the significance of each trough, consider the method used to find the appropriate threshold. In the present invention, the evaluation is self-clamping between the troughs The depth of the trough observed by the two peaks, and the pixel value corresponding to the deepest trough are regarded as the threshold for distinguishing between the dyed region and the non-stained region. According to the inventor's opinion, when the original image is divided into the dyed area and the non-stained area based on the threshold determined in this way, it is possible to obtain a result that the expert does not seem to have any discomfort.

又,本發明之另一態樣係一種圖像處理方法,其具備:藉由上述臨限值決定方法決定上述臨限值之步驟;及基於上述臨限值,將上述原圖像區分為上述染色區域與上述非染色區域之步驟。 Furthermore, another aspect of the present invention is an image processing method comprising: a step of determining the threshold value by the threshold value determining method; and dividing the original image into the above based on the threshold value The step of dyeing the area with the above non-stained area.

又,本發明之進而另一態樣係一種圖像處理裝置,其具備:圖像取得構件,其取得對已染色之細胞進行拍攝所得之原圖像;圖像處理構件,其對上述原圖像中之已染色之染色區域與未染色之非染色區域實施互不相同之圖像處理;及輸出構件,其輸出藉由上述圖像處理構件而獲得之處理結果;且上述圖像處理構件求出構成上述原圖像之各像素之像素值之頻度分佈,特定出與上述頻度分佈對應之頻佈圖中之波峰及波谷,將與上述波谷之中、相對於在上述頻佈圖中夾著該波谷之2個上述波峰而言之該波谷之深度最大的一個波谷之位置對應之像素值作為臨限值,而將上述原圖像區分為上述染色區域與上述非染色區域。 Still another aspect of the present invention provides an image processing apparatus comprising: an image acquisition means for acquiring an original image obtained by imaging a stained cell; and an image processing means for the original image Image processing in which the dyed dyed area and the unstained non-stained area are different from each other; and an output member that outputs the processing result obtained by the image processing member; and the image processing member Forming a frequency distribution of pixel values of each pixel constituting the original image, and specifying peaks and troughs in the frequency distribution map corresponding to the frequency distribution, and sandwiching the above-mentioned troughs with respect to the frequency map In the two peaks of the trough, the pixel value corresponding to the position of the valley having the largest depth of the trough is used as a threshold value, and the original image is divided into the dyed region and the non-stained region.

於該等發明中,根據基於以上述方式對各波谷之深度進行評價之結果而適當設定之臨限值,區分原圖像中之染色區域與非染色區域。因此,可自動獲得接近於熟練之專家之判斷之區分結果。 In these inventions, the dyed area and the non-stained area in the original image are distinguished based on the threshold value appropriately set based on the result of evaluating the depth of each trough in the above manner. Therefore, the discrimination result close to the judgment of the expert expert can be automatically obtained.

根據本發明,基於頻佈圖中所出現之各波谷之評價決定像素值之臨限值。藉此,對於原圖像中之染色區域與非染色區域,可實現不給用戶帶來不適感之區分。 According to the present invention, the threshold value of the pixel value is determined based on the evaluation of the respective troughs appearing in the frequency layout. Thereby, for the dyed area and the non-stained area in the original image, it is possible to achieve a distinction that does not give the user an uncomfortable feeling.

1‧‧‧攝像部(圖像取得構件、攝像部) 1‧‧‧Photography unit (image acquisition unit, imaging unit)

2‧‧‧圖像處理部(圖像處理構件) 2‧‧‧Image Processing Unit (Image Processing Unit)

3‧‧‧UI(用戶介面)部(輸出構件) 3‧‧‧UI (user interface) section (output component)

11‧‧‧影像感測器 11‧‧‧Image Sensor

12‧‧‧A/D轉換器 12‧‧‧A/D converter

21‧‧‧CPU 21‧‧‧CPU

22‧‧‧儲存器 22‧‧‧Storage

23‧‧‧介面(輸出構件、接收部) 23‧‧‧Interface (output member, receiving unit)

31‧‧‧輸入器件 31‧‧‧ Input device

32‧‧‧顯示器(輸出構件、顯示部) 32‧‧‧Display (output member, display unit)

100‧‧‧圖像處理裝置 100‧‧‧Image processing device

A[i]‧‧‧序列變數 A[i]‧‧‧ sequence variable

Cp‧‧‧標量變數 Cp‧‧‧scalar variables

Cv‧‧‧標量變數 Cv‧‧‧scalar variables

D3‧‧‧距離 D3‧‧‧ distance

D8‧‧‧距離 D8‧‧‧ distance

H[i]‧‧‧序列變數 H[i]‧‧‧ sequence variable

H0‧‧‧頻度之值 H0‧‧ ‧ frequency value

H1‧‧‧頻度之值 H1‧‧‧ frequency value

H2‧‧‧頻度之值 H2‧‧‧ frequency value

H3‧‧‧頻度之值 H3‧‧‧ frequency value

H4‧‧‧頻度之值 H4‧‧‧ frequency value

H5‧‧‧頻度之值 H5‧‧‧ frequency value

H6‧‧‧頻度之值 H6‧‧‧ frequency value

H7‧‧‧頻度之值 H7‧‧‧ frequency value

H8‧‧‧頻度之值 H8‧‧‧ frequency value

H9‧‧‧頻度之值 H9‧‧‧ frequency value

H10‧‧‧頻度之值 H10‧‧‧ frequency value

i‧‧‧序列變數之參數 Parameters of i‧‧‧ sequence variables

P2‧‧‧波峰 P2‧‧‧Crest

P6‧‧‧波峰 P6‧‧‧Crest

P9‧‧‧波峰 P9‧‧‧Crest

P[i]‧‧‧序列變數 P[i]‧‧‧ sequence variable

Q3‧‧‧交點 Q3‧‧‧ intersection

Q8‧‧‧交點 Q8‧‧‧ intersection

S101‧‧‧步驟 S101‧‧‧Steps

S102‧‧‧步驟 S102‧‧‧Steps

S103‧‧‧步驟 S103‧‧‧Steps

S104‧‧‧步驟 S104‧‧‧Steps

S105‧‧‧步驟 S105‧‧‧Steps

S106‧‧‧步驟 S106‧‧‧Steps

S107‧‧‧步驟 S107‧‧‧Steps

S108‧‧‧步驟 S108‧‧‧Steps

S109‧‧‧步驟 S109‧‧‧Steps

S110‧‧‧步驟 S110‧‧‧Steps

S111‧‧‧步驟 S111‧‧‧Steps

S121‧‧‧步驟 S121‧‧‧Steps

S122‧‧‧步驟 S122‧‧‧Steps

S123‧‧‧步驟 S123‧‧‧Steps

S201‧‧‧步驟 S201‧‧‧ steps

S202‧‧‧步驟 S202‧‧‧Steps

S203‧‧‧步驟 S203‧‧‧Steps

S204‧‧‧步驟 S204‧‧‧Steps

S205‧‧‧步驟 S205‧‧‧Steps

S206‧‧‧步驟 S206‧‧‧ steps

S207‧‧‧步驟 S207‧‧‧Steps

S208‧‧‧步驟 S208‧‧‧Steps

S209‧‧‧步驟 Step S209‧‧‧

S210‧‧‧步驟 S210‧‧‧Steps

T‧‧‧標量變數 T‧‧‧scalar variables

Th‧‧‧臨限值 Th‧‧‧ threshold

V3‧‧‧波谷 V3‧‧‧ trough

V8‧‧‧波谷 V8‧‧‧ trough

V[i]‧‧‧序列變數 V[i]‧‧‧ sequence variable

圖1係表示本發明之圖像處理裝置之一實施形態之概略構成之方塊圖。 Fig. 1 is a block diagram showing a schematic configuration of an embodiment of an image processing apparatus according to the present invention.

圖2係表示圖像處理之一例之流程圖。 Fig. 2 is a flow chart showing an example of image processing.

圖3A及圖3B係例示原圖像及由此獲得之二維資料之圖。 3A and 3B are diagrams illustrating an original image and two-dimensional data obtained thereby.

圖4係表示波峰及波谷之檢測處理之流程圖。 Fig. 4 is a flow chart showing the detection processing of the peaks and troughs.

圖5A係表示頻佈圖之例之圖。 Fig. 5A is a view showing an example of a frequency layout diagram.

圖5B係對波谷之評價方法進行說明之圖。 Fig. 5B is a view for explaining a method of evaluating a trough.

圖6係表示波峰及波谷之檢測處理中之變數之狀態轉變之圖。 Fig. 6 is a view showing a state transition of variables in detection processing of peaks and troughs.

圖7A至圖7C係表示原圖像及將其二值化所得之二值化圖像之例之圖。 7A to 7C are diagrams showing an example of an original image and a binarized image obtained by binarizing the original image.

圖8A及圖8B係表示原圖像及與其對應之頻佈圖之另一例之圖。 8A and 8B are views showing another example of the original image and the frequency distribution map corresponding thereto.

圖1係表示本發明之圖像處理裝置之一實施形態之概略構成之方塊圖。該圖像處理裝置100具有用以執行本發明之圖像處理方法之功能。作為用於此功能之具體之構成,圖像處理裝置100具備攝像部1、圖像處理部2、及UI(User Interface,用戶介面)部3。 Fig. 1 is a block diagram showing a schematic configuration of an embodiment of an image processing apparatus according to the present invention. The image processing apparatus 100 has a function to perform the image processing method of the present invention. As a specific configuration for this function, the image processing apparatus 100 includes an imaging unit 1, an image processing unit 2, and a UI (User Interface) unit 3.

攝像部1具有如下功能:對在載持於孔板、培養皿、碟盤等試樣容器之培養基內培養之細胞進行拍攝。具體而言,攝像部1具備影像感測器11、及將自影像感測器11輸出之電氣訊號轉換成數位訊號之A/D(Analog to Digital,類比-數位)轉換器12。用以保持上述試樣容器之機構亦可設於攝像部1。 The imaging unit 1 has a function of photographing cells cultured in a medium carried in a sample container such as an orifice plate, a petri dish, or a disk. Specifically, the imaging unit 1 includes an image sensor 11 and an A/D (Analog to Digital) converter 12 that converts an electrical signal output from the image sensor 11 into a digital signal. A mechanism for holding the sample container may be provided in the imaging unit 1.

作為影像感測器11,例如可使用CCD(Charge Coupled Device,電荷耦合元件)感測器或CMOS(Complementary Metal Oxide Semiconductor,互補金氧半導體)感測器等受光器件。影像感測器11可為微小之受光元件於受光平面上二維配置之區域影像感測器、受光元件排列成一行之線性影像感測器之任一者。於使用線性影像感測器之情形時,另外設置有為獲得二維圖像而使該影像感測器相對於拍攝對象物相對地掃描移動之掃描移動機構。又,影像感測器11亦可與例 如顯微鏡光學系統之類之適當之攝像光學系統組合而使用。影像感測器11根據受光量而輸出之電氣訊號藉由A/D轉換器12轉換成數位訊號,攝像部1將以此方式生成之數位圖像資料向圖像處理部2輸出。 As the image sensor 11, for example, a CCD (Charge Coupled Device) sensor or a CMOS (Complementary Metal Oxide Semiconductor) sensor or the like can be used. The image sensor 11 can be any one of a regional image sensor in which a minute light receiving element is two-dimensionally arranged on a light receiving plane, and a linear image sensor in which the light receiving elements are arranged in a line. In the case of using a linear image sensor, a scanning moving mechanism for moving the image sensor relative to the object to be scanned relative to the object for obtaining a two-dimensional image is additionally provided. Moreover, the image sensor 11 can also be an example It is used in combination with a suitable imaging optical system such as a microscope optical system. The electric signal output by the image sensor 11 based on the amount of received light is converted into a digital signal by the A/D converter 12, and the imaging unit 1 outputs the digital image data generated in this manner to the image processing unit 2.

圖像處理部2具備:CPU(Central Processing Unit,中央處理裝置)21,其執行預先準備之控制程式來實現特定之圖像處理;儲存器22,其記憶保存CPU21所應執行之控制程式、自攝像部1發送之圖像資料、於圖像處理之過程中生成之中間資料等;及介面(I/F)23,其負責圖像處理部2與外部裝置之間之資料交換。 The image processing unit 2 includes a CPU (Central Processing Unit) 21 that executes a control program prepared in advance to implement specific image processing, and a memory 22 that stores a control program to be executed by the CPU 21, and The image data transmitted by the imaging unit 1, the intermediate data generated during the image processing, and the like; and the interface (I/F) 23, which is responsible for data exchange between the image processing unit 2 and the external device.

又,UI部3具備:例如滑鼠、鍵盤、觸控面板、操作按鈕等輸入器件31,其自用戶接收處理開始指示及條件設定等操作輸入;以及顯示器32,其顯示處理之進展狀況及結果等。再者,圖像處理部2及UI部3之各構成亦可與普通個人電腦所具備之構成相同。即,可將通用之個人電腦之構成及功能作為圖像處理部2及UI部3使用。 Further, the UI unit 3 includes an input device 31 such as a mouse, a keyboard, a touch panel, and an operation button, which receives an operation input such as a processing start instruction and a condition setting from the user, and a display 32 that displays the progress and results of the processing. Wait. Furthermore, the respective configurations of the image processing unit 2 and the UI unit 3 may be the same as those of a general personal computer. In other words, the configuration and functions of a general-purpose personal computer can be used as the image processing unit 2 and the UI unit 3.

以上述方式構成之圖像處理裝置100適合用於對在試樣容器內培養之細胞之生長狀態進行觀察之目的。於此種觀察目的之實驗中,於試樣容器內對細胞進行二維培養所成之試樣藉由適當之染料而染色。於對試樣容器內進行拍攝所得之圖像中,細胞所佔據之區域被染色,形成染色區域,另一方面不存在細胞之區域成為未出現染料之顏色之非染色區域。以下,對於圖像處理裝置100可執行之圖像處理中,自拍攝所得之圖像自動識別出染色區域與非染色區域,並根據其結果將圖像二值化之一系列處理進行說明。 The image processing apparatus 100 configured as described above is suitable for the purpose of observing the growth state of cells cultured in a sample container. For the purpose of this observation, the sample obtained by two-dimensionally culturing the cells in the sample container was dyed by a suitable dye. In the image obtained by photographing the inside of the sample container, the area occupied by the cells is dyed to form a dyed area, and on the other hand, the area where the cells are not present becomes a non-stained area where the color of the dye does not appear. Hereinafter, in the image processing executable by the image processing apparatus 100, the dyed area and the non-stained area are automatically recognized from the captured image, and one series of image binarization processing will be described based on the result.

圖2係表示圖像處理之一例之流程圖。該圖像處理係藉由圖像處理部2之CPU21執行預先保存於儲存器22之控制程式來控制裝置各部而實現。首先,藉由攝像部1拍攝預先準備之試樣,即於試樣容器內對細胞進行培養所得者,藉此取得試樣之原圖像(步驟S101)。 Fig. 2 is a flow chart showing an example of image processing. This image processing is realized by the CPU 21 of the image processing unit 2 executing a control program stored in advance in the storage 22 to control each part of the apparatus. First, the imaging unit 1 captures a sample prepared in advance, that is, a cell obtained by culturing the cells in the sample container, thereby obtaining an original image of the sample (step S101).

圖3A及圖3B係例示原圖像及由此獲得之二維資料之圖。圖3A係 表示原圖像之一例之圖。於該原圖像中,於大致圓形之試樣容器之內底面,混合存在2種區域:不存在細胞,培養基露出,亮度相對較高,即接近於白色之較淡之圖像濃度之區域(非染色區域);及分佈有已染色之細胞,圖像濃度較非染色區域高(低亮度)之染色區域。接下來,按照以下方式對該等2種區域進行區分。 3A and 3B are diagrams illustrating an original image and two-dimensional data obtained thereby. Figure 3A is A diagram showing an example of an original image. In the original image, in the inner bottom surface of the substantially circular sample container, there are two kinds of regions mixed: no cells exist, the medium is exposed, and the brightness is relatively high, that is, a region close to the lighter image density of white. (non-stained area); and a stained area in which the stained cells are distributed with a higher image density than the non-stained area (low brightness). Next, the two types of areas are distinguished in the following manner.

首先,求出於構成所得之原圖像之像素中,與試樣容器內部對應之各像素之像素值之頻度分佈,製作與其對應之頻佈圖(步驟S102)。圖3B係表示頻佈圖之一例之圖。此處,將原圖像設定為單色圖像,各像素之像素值設定為以多色調表示該像素之亮度者。於各像素係由8位元資料表示之情形時,像素值係由0至255之256灰階表示。數值越小,表示該像素亮度越低,即越暗,越接近於黑色;數值越大,表示該像素亮度越高,即越亮,越接近於白色。 First, the frequency distribution of the pixel values of the respective pixels corresponding to the inside of the sample container in the pixels constituting the obtained original image is obtained, and a frequency distribution map corresponding thereto is created (step S102). Fig. 3B is a view showing an example of a frequency distribution diagram. Here, the original image is set as a monochrome image, and the pixel value of each pixel is set to indicate the brightness of the pixel in multiple colors. In the case where each pixel is represented by 8-bit data, the pixel value is represented by 256 gray scales from 0 to 255. The smaller the value, the lower the brightness of the pixel, that is, the darker, the closer to black; the larger the value, the higher the brightness of the pixel, that is, the brighter, the closer to white.

於包含染色區域與非染色區域之原圖像之頻佈圖中,期待如圖3B所示,出現與染色區域對應之低亮度側之波峰及與非染色區域對應之高亮度側之波峰,於相當於該等波峰間之波谷之位置,存在將染色區域與非染色區域分開之像素值之臨限值。即,可以說具有較該臨限值低亮度側之像素值之像素屬於染色區域,具有較臨限值高亮度側之像素值之像素屬於非染色區域之可能性較高。因此,於該圖像處理中,基於自原圖像獲得之頻度分佈,決定用以區分染色區域與非染色區域之像素值之臨限值。 In the frequency layout diagram of the original image including the dyed area and the non-stained area, as shown in FIG. 3B, it is expected that a peak on the low-luminance side corresponding to the dyed area and a peak on the high-luminance side corresponding to the non-stained area appear. The position corresponding to the valley between the peaks has a threshold value of the pixel value separating the dyed region from the non-stained region. That is, it can be said that the pixel having the pixel value on the lower luminance side than the threshold value belongs to the dyed region, and the pixel having the pixel value higher than the threshold high luminance side is highly likely to belong to the non-stained region. Therefore, in this image processing, the threshold value for distinguishing the pixel values of the dyed region from the non-stained region is determined based on the frequency distribution obtained from the original image.

然而,因已染色之細胞之色調存在個體差及不均,故於頻佈圖不一定會清晰地出現2個波峰,而存在如圖3B所示,除主要波峰以外亦出現多個細小凹凸。因此,為除去此種細小變動,而進行頻佈圖之平滑化(步驟S103)。 However, since the color of the dyed cells has individual differences and unevenness, two peaks do not necessarily appear clearly in the frequency layout, and as shown in FIG. 3B, a plurality of fine irregularities appear in addition to the main peaks. Therefore, in order to remove such small fluctuations, the frequency pattern is smoothed (step S103).

作為平滑化之方法,例如可考慮移動平均處理、中值濾波處理等。此處為避免於頻度軸上之數值之操作,而按一定週期對像素值進 行抽樣,藉此進行像素值之減取樣,由此獲得無細小凹凸之頻佈圖。該減取樣等價於在像素值之範圍內粗化其解像度。根據本案發明者之見解,可知:於像素值係由8位元256灰階表示之情形時,藉由將像素值減取樣至(1/8)左右,可不失去有意義之資訊地消除無意義之凹凸。然而,亦可根據目的變更減取樣之程度。又對於平滑化方法,亦不限定於此。 As a method of smoothing, for example, a moving average process, a median filter process, or the like can be considered. Here, in order to avoid the operation of the value on the frequency axis, the pixel value is entered in a certain period. The line sampling is performed by taking down the sampling of the pixel values, thereby obtaining a frequency layout diagram without fine concavities and convexities. This downsampling is equivalent to coarsening the resolution within the range of pixel values. According to the findings of the inventor of the present invention, it can be seen that when the pixel value is represented by an 8-bit 256 gray scale, by subtracting the pixel value to about (1/8), the meaningless can be eliminated without losing meaningful information. Bump. However, the degree of downsampling can also be changed depending on the purpose. Further, the smoothing method is not limited to this.

如圖3B中黑圓點印所示,每跳過8個像素值抽取與該像素值對應之頻度之數值,藉此獲得減取樣至(1/8)之頻度分佈。更一般化而言,可求出將相當於以減取樣之比率(於該例中為8)作為公差之等差數列上之數值之像素值分別作為一個新等級,且將與該像素值對應之頻度設為新頻度之新頻度分佈,藉此獲得平滑化後之頻度分佈及與其對應之頻佈圖。 As shown by the black dot in FIG. 3B, the value of the frequency corresponding to the pixel value is extracted every 8 pixel values skipped, thereby obtaining a frequency distribution of the downsampling to (1/8). More generally, the pixel value corresponding to the value of the subtraction sample (8 in this example) as the tolerance difference column can be obtained as a new level, and will correspond to the pixel value. The frequency is set to the new frequency distribution of the new frequency, thereby obtaining the smoothed frequency distribution and the corresponding frequency layout.

於圖3B所示之例中,藉由相當於將等差數列之首項設為0、公差設為8之等差數列{0,8,16,32,…}之各項之像素值對頻度進行抽樣,由此實現平滑化(減取樣)。然而,亦可將首項設為1至7之任一者。又,關於公差,亦如上所述並不限定於8而可適當變更。藉由以此方式進行平滑化,求出除去無意義之凹凸之新頻度分佈。繼而,檢測出與該頻度分佈對應之頻佈圖中所出現之波峰及波谷之位置及其等之高度(步驟S104)。 In the example shown in FIG. 3B, the pixel value pair of each of the arithmetic sequence columns {0, 8, 16, 32, ...} is set to 0 with the first term of the arithmetic progression column and the tolerance is set to 8. The sampling is performed frequently, thereby achieving smoothing (subtraction sampling). However, the first item can also be set to any of 1 to 7. Further, the tolerance is not limited to 8 as described above, and can be appropriately changed. By smoothing in this manner, a new frequency distribution in which the meaningless unevenness is removed is obtained. Then, the positions of the peaks and troughs appearing in the frequency distribution map corresponding to the frequency distribution and the heights thereof are detected (step S104).

圖4係表示波峰及波谷之檢測處理之流程圖。首先,進行用於處理之變數等之初始化(步驟S201)。於該處理中,使用儲存平滑化後之頻佈圖中之各等級之頻度之序列變數H[i]、表示該頻佈圖之變化狀態之序列變數A[i]、用以記錄波峰位置之序列變數P[i]、用以記錄波谷位置之序列變數V[i]、對波峰之出現個數進行計數之標量變數Cp、對波谷之出現個數進行計數之標量變數Cv、及表示頻佈圖之變化傾向之標量變數T。 Fig. 4 is a flow chart showing the detection processing of the peaks and troughs. First, initialization of variables or the like for processing is performed (step S201). In this processing, a sequence variable H[i] storing the frequency of each level in the smoothed frequency pattern, a sequence variable A[i] indicating a change state of the frequency pattern, and a position for recording a peak are used. The sequence variable P[i], the sequence variable V[i] for recording the position of the trough, the scalar variable Cp for counting the number of occurrences of the peak, the scalar variable Cv for counting the number of occurrences of the trough, and the frequency distribution The scalar variable T of the tendency of the graph to change.

再者,各序列變數之參數i表示平滑化後之頻度分佈及頻佈圖中之各等級,與自原本之頻佈圖抽樣之像素值1對1地對應。即,相當於抽樣時之等差數列之首項、第2項、第3項…之像素值與級數0、1、2…分別對應。於基於上述首項0、公差8之等差數列之減取樣之情形時,像素值0、8、16…分別與級數0、1、2…對應。於不進行減取樣之情形時,像素值直接成為級數。以下,藉由符號N表示平滑化後之等級之總數。於將256灰階之原資料減取樣至(1/8)之案列中,N=32。 Furthermore, the parameter i of each sequence variable indicates the level of the smoothed frequency distribution and the level in the frequency distribution map, and corresponds to the pixel value of the original frequency pattern sampling. That is, the pixel values corresponding to the first item, the second item, and the third item of the arithmetic progression number at the time of sampling correspond to the stages 0, 1, 2, ..., respectively. In the case of the downsampling based on the first order 0 and the tolerance of the difference 8, the pixel values 0, 8, 16, ... correspond to the stages 0, 1, 2, ..., respectively. When the sampling is not performed, the pixel value directly becomes the number of stages. Hereinafter, the total number of smoothed levels is indicated by the symbol N. Subtract the raw data of 256 gray scales to the case of (1/8), N=32.

於初始狀態下,於序列變數H[i],儲存與平滑化後之頻度分佈之級數i(i=0,1,…,N)各者對應之頻度之值。於另一序列變數A[i]、P[i]、V[i]設定無效資料。又於標量變數Cp、Cv分別設定初始值「0」。又於表示頻佈圖是與等級一併上升之態樣還是下降之態樣之傾向之標量變數T,設定初始值「up」。 In the initial state, the value of the frequency corresponding to each of the series i (i = 0, 1, ..., N) of the frequency distribution after smoothing is stored in the sequence variable H[i]. Invalid data is set for another sequence variable A[i], P[i], V[i]. Further, the initial values "0" are set for the scalar variables Cp and Cv, respectively. Further, the initial value "up" is set to indicate that the frequency distribution map is a scalar variable T which is a tendency to rise with the level or a tendency to fall.

繼而,基於表示平滑化後之頻度分佈之序列變數H[i],記錄表示頻佈圖之變化狀態之序列變數A[i](步驟S202)。具體而言,藉由基於相互鄰接之值H[i]與值H[i-1]之比較之情形分類,根據以下條件式: Then, based on the sequence variable H[i] indicating the frequency distribution after smoothing, the sequence variable A[i] indicating the state of change of the frequency distribution map is recorded (step S202). Specifically, by classifying the cases based on the comparison of the values H[i] and the values H[i-1] adjacent to each other, according to the following conditional expression:

H[i]>H[i-1]時,「上升」 When H[i]>H[i-1], "rise"

H[i]=H[i-1]時,「不變」 When H[i]=H[i-1], "unchanged"

H[i]<H[i-1]時,「下降」 "Hescent" when H[i]<H[i-1]

設定值A[i]。如由上述定義所明瞭,值A[i]為「上升」時,於該等級,頻度較低1級增加。又,值A[i]為「不變」時,於該等級,頻度與低1級相同。又,值A[i]為「下降」時,於該等級,頻度較低1級減少。如此,序列變數A[i]表示頻佈圖之各部分之頻度之增減之狀態。 Set the value A[i]. As is clear from the above definition, when the value A[i] is "rise", the frequency is increased by one level at this level. Further, when the value A[i] is "unchanged", the frequency is the same as the lower level at this level. Further, when the value A[i] is "decline", the frequency is lowered by one level at this level. Thus, the sequence variable A[i] represents the state of increase or decrease in the frequency of each part of the frequency layout.

然後,對各等級i重複執行步驟S204至S208之處理,藉此評價各等級之頻度,特定頻佈圖中之波峰與波谷之位置及其高度。具體而 言,將所要評價之級數i設定為初始值1(步驟S203),直至級數成為最後之值N為止(步驟S209),一面逐一遞增級數i(步驟S210),一面執行步驟S204至S209之重複處理。 Then, the processing of steps S204 to S208 is repeatedly performed for each level i, thereby evaluating the frequency of each level, the position of the peaks and troughs in the specific frequency map, and the height thereof. Specifically In other words, the number i to be evaluated is set to the initial value 1 (step S203) until the number of stages becomes the last value N (step S209), and the number i is incremented one by one (step S210), and steps S204 to S209 are performed. Repeated processing.

對各個重複處理之內容進行說明。於步驟S204中,判定與目前著眼之級數i對應之值A[i]是否「不變」。若值A[i]「不變」,則(於步驟S204中為YES),跳過步驟S205至S208之處理。若值A[i]為「上升」或「下降」(於步驟S204中為NO),則繼而執行步驟S205。 The contents of each repeated process will be described. In step S204, it is determined whether or not the value A[i] corresponding to the current level i is "unchanged". If the value A[i] is "unchanged", then (YES in step S204), the processing of steps S205 to S208 is skipped. If the value A[i] is "rise" or "fall" (NO in step S204), then step S205 is performed.

於步驟S205中,評價與目前著眼之級數i對應之值A[i]及標量變數T。具體而言,於標量變數T之值為「up」,且值A[i]為「下降」之情形時,繼而執行步驟S206,於除此以外之情形時跳過步驟S206。 In step S205, the value A[i] corresponding to the current number of stages i and the scalar variable T are evaluated. Specifically, when the value of the scalar variable T is "up" and the value A[i] is "down", step S206 is performed, and in other cases, step S206 is skipped.

於步驟S206中,以如下方式進行變數之改寫。即,於與較目前著眼之等級i小1級之等級(i-1)對應之變數P[i-1],記錄表示於該位置存在波峰之資訊。究竟是以何種態樣記錄波峰位置為任意,例如亦可不使用此種序列變數,而僅僅於記憶體或暫存器記憶波峰位置。又,於表示波峰之個數之變數Cp之值上加上1,進而變數T變更為「down」。 In step S206, the rewriting of the variables is performed in the following manner. That is, the information indicating the presence of a peak at the position is recorded in the variable P[i-1] corresponding to the level (i-1) which is one level smaller than the current level i. It is arbitrary to record the peak position in any aspect. For example, the sequence variable may not be used, but only the memory or the register memory peak position. Further, 1 is added to the value of the variable Cp indicating the number of peaks, and the variable T is changed to "down".

於接下來之步驟S207中,評價與目前著眼之級數i對應之值A[i]及標量變數T。於標量變數T之值為「down」,且值A[i]「上升」之情形時,繼而執行步驟S208。於除此以外之情形時,跳過步驟S208。 In the next step S207, the value A[i] corresponding to the current number of stages i and the scalar variable T are evaluated. When the value of the scalar variable T is "down" and the value A[i] is "up", step S208 is performed. In the case other than this, step S208 is skipped.

於步驟S208中,以如下方式進行變數之改寫。即,於與較目前著眼之等級i小1級之等級(i-1)對應之變數V[i-1],記錄表示於該位置存在波谷之資訊。與波峰位置之記錄相同,資訊之態樣任意。又,於表示波谷之個數之變數Cv之值上加上1,進而變數T變更為「up」。 In step S208, the rewriting of the variables is performed in the following manner. That is, the variable V[i-1] corresponding to the level (i-1) which is one level smaller than the current level i is recorded, and information indicating that there is a trough at the position is recorded. As with the record of the peak position, the information is arbitrary. Further, 1 is added to the value of the variable Cv indicating the number of valleys, and the variable T is changed to "up".

列舉實例,對藉由如上所述之重複處理檢測出波峰及波谷之程序進行說明。為便於以下之說明,對藉由上述重複指令中之條件分支而取得之處理路徑附加編號。如圖4之右上之表所示,將步驟S204中 之判斷結果為「YES」時之處理路徑,即跳過步驟S205至S208,自步驟S204直接跳到步驟S209之路徑稱為「路徑1」。同樣地,將步驟S204、S205、S207之判斷結果分別為「NO」、「NO」、YES」時之處理路徑稱為「路徑2」。又,將步驟S204、S205、S207之判斷結果分別為「NO」、「YES」、「NO」時之處理路徑稱為「路徑3」。又,將步驟S204、S205、S207之判斷結果均為「NO」時之處理路徑稱為「路徑4」。 The procedure for detecting peaks and troughs by repeated processing as described above will be described by way of examples. For the convenience of the following description, the processing path obtained by the conditional branch in the above-mentioned repeated instruction is numbered. As shown in the table on the upper right of FIG. 4, step S204 is The processing result when the determination result is "YES" is to skip steps S205 to S208, and the path directly jumping from step S204 to step S209 is referred to as "path 1". Similarly, the processing path when the determination results of steps S204, S205, and S207 are "NO", "NO", and YES" is referred to as "path 2". Further, the processing path when the determination results of steps S204, S205, and S207 are "NO", "YES", and "NO" is referred to as "path 3". Further, the processing path when the determination results of steps S204, S205, and S207 are all "NO" is referred to as "path 4".

再者,如於表中附加編號(5)而表示般,於步驟S205、S207中判斷結果均為「YES」之案列不能自變數A[i]之定義來看待。即,因並非沿依序執行步驟S204至S208全部之處理路徑推進處理,故無需考慮該處理路徑。 Further, as indicated by the addition of the number (5) in the table, the case in which the determination result is "YES" in steps S205 and S207 cannot be considered from the definition of the variable A[i]. That is, since the processing path advancement processing of all of steps S204 to S208 is not sequentially performed, it is not necessary to consider the processing path.

圖5A係表示頻佈圖之例之圖。又,圖6係表示波峰及波谷之檢測處理中之變數之狀態轉變之圖。以下,以圖5A所示之頻佈圖為例對波峰及波谷檢測處理之進展進行說明。該頻佈圖係用於說明之假想者,與圖3B所示之頻佈圖並不直接相關。又,圖5A之頻佈圖僅表示等級之一部分,具體而言即0至N級中之0至10級。 Fig. 5A is a view showing an example of a frequency layout diagram. Moreover, FIG. 6 is a view showing a state transition of the variables in the detection processing of the peaks and troughs. Hereinafter, the progress of the peak and valley detection processing will be described using the frequency layout diagram shown in FIG. 5A as an example. This frequency map is used to illustrate the hypothesis, and is not directly related to the frequency layout shown in FIG. 3B. Moreover, the frequency layout of FIG. 5A represents only one of the levels, specifically 0 to 10 of the 0 to N levels.

假設平滑化後之頻佈圖為圖5A所示者。藉由符號Hi(i=0,1,2,…,N),表示與各等級i(i=0,1,2,…,N)對應之頻度之值H[i]。即,例如H[0]=H0、H[1]=H1、…。向於圖6之表中於左端記為「H[i]」之列,記入於步驟S201中初始化,且與級數i對應之頻度之值H[i]。插入於各值之間之記號(=)、(<)、(>)表示頻度於相鄰之等級間之大小關係,與圖5A之頻佈圖對應。即,H0=H1、H1<H2、H2>H3、…。 It is assumed that the smoothed frequency layout is as shown in Fig. 5A. The value H[i] of the frequency corresponding to each level i (i = 0, 1, 2, ..., N) is represented by the symbol Hi (i = 0, 1, 2, ..., N). That is, for example, H[0]=H0, H[1]=H1, . In the table of Fig. 6, the column "H[i]" at the left end is recorded in the value of the frequency H[i] initialized in step S201 and corresponding to the number of stages i. The symbols (=), (<), and (>) inserted between the values indicate the magnitude relationship between the frequencies in the adjacent levels, and correspond to the frequency layout of FIG. 5A. That is, H0=H1, H1<H2, H2>H3, .

於步驟S202中,基於序列變數H[i],求出表示頻佈圖之變化狀態之序列變數A[i]。即,基於值H[i]相對於值H[i-1]之變化,設定值A[i]為「上升」、「不變」、「下降」之任一者。於圖5A所示之例中,因 H[0]=H[1],故如圖6所示A[1]之值「不變」。又,因H[1]<H[2],故A[2]之值「上升」。進而,因H[2]>H[3],故A[3]之值「下降」。以後之各值亦係以相同方式求出,並提供至重複處理。如上所述,變數T之初始值為「up」。 In step S202, a sequence variable A[i] indicating a change state of the frequency distribution map is obtained based on the sequence variable H[i]. That is, the set value A[i] is any of "rise", "unchanged", and "declined" based on the change of the value H[i] with respect to the value H[i-1]. In the example shown in Figure 5A, H[0]=H[1], so the value of A[1] is "unchanged" as shown in FIG. 6. Also, since H[1]<H[2], the value of A[2] is "up". Further, since H[2]>H[3], the value of A[3] is "decreased". The subsequent values are also obtained in the same manner and provided to the repeated processing. As described above, the initial value of the variable T is "up".

於第1次重複處理(i=1)中,A[i]=A[1]之值「不變」,因此執行沿處理路徑1之處理,各變數之值無變化。於第2次重複處理(i=2)中,A[2]之值「上升」,T之值為「up」,因此執行沿處理路徑4之處理。於該情形時,各變數之值亦無變化。 In the first iterative process (i = 1), the value of A[i] = A[1] is "unchanged", so the processing along the processing path 1 is executed, and the values of the variables are not changed. In the second iteration (i=2), the value of A[2] is "up" and the value of T is "up", so the processing along the processing path 4 is executed. In this case, the values of the variables are also unchanged.

於第3次重複處理(i=3)中,A[3]之值「下降」,T之值為「up」,因此步驟S205中之判斷為「YES」,執行沿處理路徑3之處理。因此,記錄於P[i-1],即P[2]存在波峰之資訊。於圖6中,藉由黑圓點印表示波峰位置。又,對波峰個數進行計數之變數Cp由0變更為1,變數T由「up」變更為「down」。 In the third iteration (i=3), the value of A[3] is "declined" and the value of T is "up". Therefore, the determination in step S205 is "YES", and the processing along the processing path 3 is executed. Therefore, it is recorded in P[i-1], that is, P[2] has information on the peak. In Fig. 6, the peak position is indicated by a black dot print. Further, the variable Cp for counting the number of peaks is changed from 0 to 1, and the variable T is changed from "up" to "down".

於第4次重複處理(i=4)中,A[4]之值「上升」,T之值為「down」,因此步驟S207中之判斷為「YES」,執行沿處理路徑2之處理。因此,記錄於V[3]存在波谷之資訊。於圖6中,藉由白圓點印表示波谷位置。又,對波谷個數進行計數之變數Cv由0變更為1,變數T由「down」變更為「up」。 In the fourth iteration (i=4), the value of A[4] is "up" and the value of T is "down". Therefore, the determination in step S207 is "YES", and the processing along the processing path 2 is executed. Therefore, the information on the valley of V[3] is recorded. In Fig. 6, the trough position is indicated by a white dot print. Further, the variable Cv for counting the number of troughs is changed from 0 to 1, and the variable T is changed from "down" to "up".

於第5次重複處理(i=5)中,A[5]之值「不變」,因此執行沿處理路徑1之處理,各變數之值不變。於第6次重複處理(i=6)中,A[6]之值「上升」,T之值為「up」,因此執行沿處理路徑4之處理。於該情形時,各變數之值亦無變化。 In the fifth iteration (i=5), the value of A[5] is "unchanged", so the processing along the processing path 1 is executed, and the values of the variables are unchanged. In the sixth iteration (i=6), the value of A[6] is "up" and the value of T is "up", so the processing along the processing path 4 is executed. In this case, the values of the variables are also unchanged.

於第7次重複處理(i=7)中,A[7]之值「下降」,T之值為「up」,因此與第3次相同,執行沿處理路徑3之處理。藉此,於P[6]記錄有波峰,對波峰個數進行計數之變數Cp之值增加1,T之值變更為「down」。於第8次重複處理(i=8)中,A[8]之值「下降」,T之值為 「down」,因此與第6次相同,執行沿處理路徑4之處理,各變數之值不變。 In the seventh iteration (i=7), the value of A[7] is "declined" and the value of T is "up". Therefore, the processing along the processing path 3 is executed in the same manner as the third time. Thereby, a peak is recorded in P[6], the value of the variable Cp for counting the number of peaks is increased by 1, and the value of T is changed to "down". In the 8th iteration (i=8), the value of A[8] is "declined" and the value of T is "down", therefore, the same as the sixth time, the processing along the processing path 4 is executed, and the values of the variables are unchanged.

於第9次重複處理(i=9)中,A[9]之值「上升」,T之值為「down」,因此執行沿處理路徑2之處理。因此,記錄於V[8]存在波谷之資訊。又,對波谷個數進行計數之變數Cv由1增加至2,變數T由「down」變更為「up」。於第10次重複處理(i=10)中,A[10]之值「下降」,T之值為「up」,因此執行沿處理路徑3之處理。藉此,於P(9)記錄有波峰,對波峰個數進行計數之變數Cp之值增加1,T之值變更為「down」。 In the ninth iteration (i=9), the value of A[9] is "up" and the value of T is "down", so the processing along the processing path 2 is executed. Therefore, information on the existence of troughs in V[8] is recorded. Further, the variable Cv for counting the number of troughs is increased from 1 to 2, and the variable T is changed from "down" to "up". In the tenth iteration (i=10), the value of A[10] is "declined" and the value of T is "up", so the processing along the processing path 3 is performed. Thereby, a peak is recorded in P(9), the value of the variable Cp for counting the number of peaks is increased by 1, and the value of T is changed to "down".

以此方式,執行圖4之流程圖所示之處理,藉此特定並記錄頻佈圖中之波峰位置及波谷位置。參照圖6,於i=2、6及9時記錄有波峰,另一方面,於i=3、8時記錄有波谷。可知該結果與圖5A所示之頻佈圖之波峰位置及波谷位置一致。 In this manner, the processing shown in the flowchart of FIG. 4 is performed, whereby the peak position and the trough position in the frequency map are specified and recorded. Referring to Fig. 6, peaks are recorded at i = 2, 6, and 9, and on the other hand, troughs are recorded at i = 3, 8. It can be seen that the result coincides with the peak position and the trough position of the frequency layout shown in FIG. 5A.

返回至圖2,繼續對本實施形態之圖像處理進行說明。若以上述方式特定頻佈圖中之波峰及波谷,則進行波谷之評價及基於該評價之臨限值之決定。視檢測出之波谷之個數,即變數Cv之值,處理內容不同。 Returning to Fig. 2, the image processing of this embodiment will be described. If the peaks and troughs in the frequency layout are specified in the above manner, the evaluation of the trough and the determination of the threshold based on the evaluation are performed. The processing content is different depending on the number of detected troughs, that is, the value of the variable Cv.

當檢測出之波谷之個數為2以上時(於步驟S105中為YES),與各波谷中其深度最大者之位置對應之像素值被視為臨限值(步驟S106、S107)。波谷之評價係以如下方式進行。 When the number of detected troughs is 2 or more (YES in step S105), the pixel value corresponding to the position of the highest trough in each trough is regarded as a threshold (steps S106 and S107). The evaluation of the trough was carried out in the following manner.

圖5B係對波谷之評價方法進行說明之圖。於對圖5A所示之頻佈圖進行波峰及波谷之檢測時,如圖5B所示,分別於i=2之位置檢測出具有值H2之波峰P2,於i=6之位置檢測出具有值H6之波峰P6,於i=9之位置檢測出具有值H9之波峰P9。又,分別於i=3之位置檢測出具有值H3之波谷V3,於i=8之位置檢測出具有值H8之波谷V8。 Fig. 5B is a view for explaining a method of evaluating a trough. When the peaks and troughs are detected on the frequency pattern shown in FIG. 5A, as shown in FIG. 5B, the peak P2 having the value H2 is detected at the position of i=2, and the value is detected at the position of i=6. The peak P6 of H6 detects a peak P9 having a value of H9 at the position of i=9. Further, a valley V3 having a value H3 is detected at a position of i=3, and a valley V8 having a value H8 is detected at a position of i=8.

區分染色區域與非染色區域之像素值之臨限值被認為於頻佈圖 中處於與染色區域對應之波峰和與非染色區域對應之波峰之間。因此,較有效為將與存在於2個波峰之間之較深波谷之位置對應之像素值作為臨限值。自該觀點,各波谷係藉由自於頻佈圖中處於夾著該波谷之位置之2個波峰觀察之深度而評價。 The threshold value that distinguishes the pixel values of the dyed area from the non-stained area is considered to be the frequency layout. The middle is between the peak corresponding to the dyed area and the peak corresponding to the non-stained area. Therefore, it is more effective to use a pixel value corresponding to the position of the deep trough existing between the two peaks as a threshold value. From this point of view, each trough is evaluated by the depth observed from the two peaks at the position sandwiching the trough in the frequency layout.

具體而言,如圖5B所示,波谷V3之深度係藉由距離D3而定義,該距離D3係連接夾著該波谷V3之2個波峰P2、P6之線段(虛線)與通過波谷V3且平行於縱軸(頻度軸)之(相當於由方程式i=3所表示之直線)線段之交點Q3至波谷V3。另一方面,波谷V8之深度係藉由距離D8而定義,該距離D8係連接夾著該波谷V8之2個波峰P6、P9之線段與通過波谷V8且平行於縱軸之線段之交點Q8至波谷V8。 Specifically, as shown in FIG. 5B, the depth of the valley V3 is defined by a distance D3 which is a line segment (dashed line) connecting the two peaks P2 and P6 sandwiching the valley V3 and parallel to the valley V3. The intersection Q3 to the valley V3 of the line segment of the vertical axis (frequency axis) (corresponding to the straight line represented by the equation i=3). On the other hand, the depth of the valley V8 is defined by a distance D8 which connects the line segment of the two peaks P6 and P9 sandwiching the valley V8 with the intersection point Q8 of the line passing through the valley V8 and parallel to the vertical axis. Wave Valley V8.

若使用數式表示波谷之深度,則如下所示。例如關於波谷V3之深度,可以如下方式表示。若將相當於點Q3之頻度之值設為h3,則如由圖5B之波峰P2與波峰P6之關係所知,可表示為:h3=H2+(H6-H2)‧(3-2)/(6-2)。 If the formula is used to represent the depth of the trough, it is as follows. For example, regarding the depth of the valley V3, it can be expressed as follows. If the value corresponding to the frequency of the point Q3 is h3, it is known as the relationship between the peak P2 and the peak P6 of FIG. 5B, and can be expressed as: h3=H2+(H6-H2)‧(3-2)/( 6-2).

此處,數值3、2、6分別為與波峰P3、P2、P6之位置對應之等級i之值。因此,關於波谷V3之深度D3可藉由下式表示:D3=h3-H3=H2+(H6-H2)‧(3-2)/(6-2)-H3。 Here, the values 3, 2, and 6 are values of the level i corresponding to the positions of the peaks P3, P2, and P6, respectively. Therefore, the depth D3 with respect to the valley V3 can be expressed by the following formula: D3 = h3 - H3 = H2 + (H6 - H2) ‧ (3-2) / (6-2) - H3.

如此,關於各波谷之深度,可自該波谷之位置及頻度之值、夾著該波谷之2個波峰各自之位置及頻度之值算出。 Thus, the depth of each trough can be calculated from the value of the position and frequency of the trough, and the value of the position and frequency of each of the two peaks sandwiching the trough.

可認為各波谷中,以上述方式求出之深度最大者係分開2個波峰之最主要之波谷。與相當於該波谷位置之等級對應之像素值設定為將染色區域與非染色區域區分開來之臨限值(步驟S107)。於檢測出複數個波谷之情形時,以此方式決定臨限值。 It can be considered that among the troughs, the largest depth obtained by the above method is the most important trough of the two peaks. The pixel value corresponding to the level corresponding to the position of the trough is set as a threshold value that distinguishes the dyed area from the non-stained area (step S107). The threshold is determined in this way when a plurality of troughs are detected.

另一方面,於檢測出之波谷為1個之情形時(於步驟S105中為NO且於步驟S121中為YES),即於僅檢測出夾著1個波谷之2個波峰之情形時,當然可以說該等2個波峰與染色區域及非染色區域對應,其間 之波谷係分為染色區域與非染色區域者。因此,與相當於該波谷位置之等級對應之像素值設定為該情形時之臨限值(步驟S122)。 On the other hand, when there is one detected trough (NO in step S105 and YES in step S121), that is, when only two peaks sandwiching one trough are detected, of course It can be said that these two peaks correspond to the dyed area and the non-stained area, during which The trough is divided into dyed areas and non-stained areas. Therefore, the pixel value corresponding to the level corresponding to the trough position is set as the threshold value in the case (step S122).

又,於波谷之個數為0,即未檢測出波谷之情形時(於步驟S121中為NO),提示僅存在1個波峰,此表示整個試樣容器內均被染色區域或非染色區域佔據之可能性較高。整體為非染色區域係細胞未生長之狀態,此種試樣不太會被作為觀察對象。更現實而言,可考慮細胞於整個試樣容器內擴散,圖像整體成為染色區域。因此,於該情形時,與頻佈圖中所出現之單個波峰之高亮度側之末端位置對應之像素值係設定為臨限值(步驟S123)。 Further, when the number of the troughs is 0, that is, when the troughs are not detected (NO in step S121), it is indicated that there is only one peak, which means that the entire sample container is occupied by the dyed area or the non-stained area. The possibility is higher. The whole is a state in which the cells in the non-stained region are not grown, and such a sample is less likely to be observed. More realistically, it is conceivable that the cells diffuse throughout the sample container, and the entire image becomes a stained area. Therefore, in this case, the pixel value corresponding to the end position on the high luminance side of the single peak appearing in the frequency layout is set as the threshold value (step S123).

若以該方式決定臨限值,則基於臨限值區分染色區域與非染色區域(步驟S108)。具體而言,認為具有較臨限值低亮度之像素值之較暗像素屬於染色區域,認為具有較臨限值高亮度之像素值之較亮像素屬於非染色區域。將具有與臨限值相等之像素值之像素區分為染色區域還是非染色區域任意。如此,原圖像內之各像素被區分為染色區域或非染色區域之一者。 When the threshold is determined in this manner, the dyed area and the non-stained area are distinguished based on the threshold (step S108). Specifically, a darker pixel having a pixel value having a lower luminance than a threshold value belongs to a dyed region, and a brighter pixel having a pixel value having a higher luminance than a threshold value is considered to belong to a non-stained region. A pixel having a pixel value equal to the threshold value is classified as a dyed region or a non-stained region. Thus, each pixel in the original image is divided into one of a dyed area or a non-stained area.

繼而,算出原圖像之集合(步驟S109)。集合係表示原圖像(嚴格而言,為其中與試樣容器內對應之區域)中染色區域所占比率(面積比)之指標值。於不存在細胞、原圖像之整體為非染色區域之情形時,集合為0,相反地原圖像之整體為染色區域之情形時之集合為1。可藉由集合之值,定量地表示試樣容器內之細胞之生長狀態。藉由適當地設定臨限值,可利用自拍攝所得之原圖像自動算出之集合之值定量地表示細胞之生長狀態。 Then, a set of original images is calculated (step S109). The collection system indicates an index value of the ratio (area ratio) of the dyed region in the original image (strictly speaking, the region corresponding to the inside of the sample container). In the case where there is no cell and the entire original image is a non-stained region, the set is 0, and conversely, the set of the original image is a dyed region. The growth state of the cells in the sample container can be quantitatively represented by the value of the set. By appropriately setting the threshold value, the growth state of the cells can be quantitatively represented by the value of the set automatically calculated from the original image obtained by the photographing.

又,藉由對基於臨限值而區分之染色區域與非染色區域賦予互不相同之像素值,製作二值化之圖像(步驟S110)。所製作之二值化圖像顯示於顯示器32並提示給用戶(步驟S111)。或,經由介面23輸出至外部裝置。 Further, by binarizing the pixel values different from each other in the dyed region and the non-stained region which are distinguished based on the threshold value, a binarized image is created (step S110). The created binarized image is displayed on the display 32 and presented to the user (step S111). Or, it is output to the external device via the interface 23.

圖7A至圖7C係表示原圖像及將其二值化所得之二值化圖像之例之圖。具體而言,圖7A係原圖像之一例,圖7B表示其頻佈圖。又,圖7C係表示二值化之圖像之圖。如圖7A所示,於該試樣中,分佈有細胞且被染色之染色區域與不存在細胞之非染色區域複雜地混雜,於染色區域中濃淡之不均亦較大。因此,如圖7B所示,於頻佈圖中亦出現複數個較大凹凸。 7A to 7C are diagrams showing an example of an original image and a binarized image obtained by binarizing the original image. Specifically, FIG. 7A is an example of an original image, and FIG. 7B is a frequency diagram thereof. Further, Fig. 7C is a view showing an image of binarization. As shown in Fig. 7A, in the sample, cells were distributed and the stained stained region was complicatedly mixed with the non-stained region in which the cells were absent, and the unevenness in the stained region was also large. Therefore, as shown in FIG. 7B, a plurality of large irregularities also appear in the frequency layout.

對具有此種頻佈圖之原圖像執行上述圖像處理而獲得之二值化圖像為圖7C所示之圖像。於圖7C中,被區分為染色區域之像素區別塗成黑色,被區分為非染色區域之像素區別塗成白色。即,給被區分為染色區域之像素分配相對較低亮度之第1像素值,另一方面給被區分為非染色區域之像素分配相對於第1像素值相對較高亮度之第2像素值。若與圖7A所示之原圖像比較,則可以說自原圖像之濃淡藉由視認而掌握之染色區域與非染色區域之邊界與藉由圖像處理自動製作之二值化圖像中之該等區域之邊界非常一致。於圖7B中,符號Th表示藉由本實施形態之圖像處理而設定之臨限值。可知於自2個波峰觀察之深度最大之波谷之位置設定有臨限值。 The binarized image obtained by performing the above-described image processing on the original image having such a frequency map is the image shown in Fig. 7C. In Fig. 7C, the pixels which are divided into the dyed areas are differently painted in black, and the pixels which are distinguished as the non-stained areas are painted white. That is, the first pixel value of the relatively low luminance is assigned to the pixel divided into the dyed area, and the second pixel value of the relatively high luminance with respect to the first pixel value is assigned to the pixel divided into the non-stained area. If compared with the original image shown in FIG. 7A, it can be said that the boundary between the dyed area and the non-stained area grasped from the original image by the visual recognition and the binarized image automatically created by image processing The boundaries of these areas are very consistent. In Fig. 7B, the symbol Th indicates the threshold value set by the image processing of the present embodiment. It can be seen that the threshold value is set at the position of the valley having the largest depth observed from the two peaks.

圖8A及圖8B係表示原圖像及與其對應之頻佈圖之另一例之圖。具體而言,圖8A係頻佈圖具有單個波峰之圖像之例,圖8B係頻佈圖具有單個波谷之圖像之例。於圖8A所示之原圖像中,染色區域於整個試樣容器內擴展,其濃度之不均亦較小。此種試樣可認為係細胞分佈於整個容器內。如頻佈圖上虛線所示,藉由於波峰之高亮度側末端位置設定臨限值,使原圖像整體被劃分為染色區域。 8A and 8B are views showing another example of the original image and the frequency distribution map corresponding thereto. Specifically, FIG. 8A is an example of an image with a single peak, and FIG. 8B is an example of an image with a single trough. In the original image shown in Fig. 8A, the dyed area spreads throughout the sample container, and the unevenness of the concentration is also small. Such a sample can be considered to be a distribution of cells throughout the container. As indicated by the dotted line on the frequency layout diagram, the original image is divided into the dyed area as a whole by setting the threshold value at the high-luminance side end position of the peak.

又,於圖8B所示之原圖像中,例如與圖7A所示之圖像比較,較亮之非染色區域與較暗之染色區域之不同相對較清晰地出現。於與此種原圖像對應之頻佈圖中,相當於染色區域之低亮度側之波峰與相當於非染色區域之高亮度側之波峰較清楚地表現出來。因此,如頻佈圖 上虛線所示,於夾於2個波峰之波谷之位置設定臨限值,藉此可將染色區域與非染色區域確實地區別開來。 Further, in the original image shown in Fig. 8B, for example, compared with the image shown in Fig. 7A, the difference between the brighter non-stained area and the darker stained area appears relatively clearly. In the frequency layout corresponding to the original image, the peak on the low-luminance side corresponding to the dyed region and the peak on the high-luminance side corresponding to the non-stained region are more clearly expressed. Therefore, such as frequency layout As indicated by the upper dotted line, a threshold value is set at a position sandwiched between the valleys of the two peaks, whereby the dyed area and the non-dyed area can be surely distinguished.

如上所述,於該實施形態中,檢測出構成原圖像之各像素之像素值之頻佈圖中之波峰及波谷。於所檢測出之波谷中,自夾著該波谷之2個波峰評價之波谷之深度最大者之位置,設定用以區分染色區域與非染色區域之像素值之臨限值。藉由此種操作,可藉由圖像處理自動獲得與用戶之視認所做出之區分結果無違背感之區分結果。 As described above, in this embodiment, the peaks and troughs in the frequency map of the pixel values of the respective pixels constituting the original image are detected. In the detected troughs, the threshold value for distinguishing the pixel values of the dyed region from the non-stained region is set from the position where the depth of the troughs of the two peaks of the trough is the largest. By such an operation, it is possible to automatically obtain a distinction between the result of the discrimination made by the user and the result of the discrimination by the image processing.

於評價波谷時,以與將夾著該波谷之2個波峰連接起來之線段和通過該波谷與縱軸(頻度軸)平行之線段之交點相當的頻度之值、和該波谷中之頻度之值的差作為該波谷之深度。藉由此種操作,可自複數個波谷之中特定出2個波峰之間之最明顯之波谷。 In evaluating the trough, the value of the frequency corresponding to the intersection of the line segment connecting the two peaks sandwiching the trough and the line segment parallel to the vertical axis (frequency axis), and the value of the frequency in the trough The difference is the depth of the trough. With this operation, the most obvious trough between the two peaks can be specified from the complex troughs.

於多灰階表現之像素值之頻佈圖中,產生因試樣之濃度不均而導致之細小凹凸,將該等之全部視作波峰及波谷反而會使判定精度下降。較理想為藉由進行平滑化,預先除去此種小凹凸。於上述實施形態中,作為平滑化之一態樣,於使用像素值整體中抽樣出之一部分像素值及與其對應之頻度之值再構成之頻佈圖中對波峰及波谷進行檢測而決定臨限值。具體而言,以抽出之像素值之數列整體成為等差數列之方式,進行像素值之週期性之減取樣。藉由適當地進行像素值之減取樣,可不受小凹凸影響地決定臨限值。 In the frequency layout of the pixel values of the multi-gray scale, fine concavities and convexities due to uneven concentration of the sample are generated, and all of these are regarded as peaks and troughs, which degrades the determination accuracy. It is preferable to remove such small irregularities in advance by performing smoothing. In the above embodiment, as one of the smoothing modes, the peaks and troughs are detected in the frequency distribution pattern in which the pixel values are sampled and the frequency values corresponding thereto are used to determine the threshold. value. Specifically, the periodic sampling of the pixel values is performed so that the entire number of extracted pixel values becomes an arithmetic progression. By appropriately performing the downsampling of the pixel values, the threshold can be determined without being affected by the small unevenness.

再者,可認為於檢測出之波谷為1個之情形時,夾著該波谷之2個波峰分別與染色區域與非染色區域對應。因此,於該情形時藉由於單個之波谷位置設定臨限值,可確實地區分染色區域與非染色區域。 In addition, when the detected trough is one, it is considered that the two peaks sandwiching the trough correspond to the dyed area and the non-stained area, respectively. Therefore, in this case, the dyed area and the non-stained area can be surely distinguished by setting the threshold value by a single trough position.

又,自於未檢測出波谷,即於頻佈圖中僅存在單個波峰之情形時,原圖像整體成為染色區域之可能性較高之觀點,於該波峰之高亮度側之末端位置設定臨限值。藉由此種操作,包含於波峰之像素全部被區分為染色區域,從而可獲得與實態一致之結果。 Further, since the trough is not detected, that is, when there is only a single peak in the frequency layout, the possibility that the original image as a whole is likely to be a dyed region is high, and the end position of the peak on the high luminance side is set. Limit. By this operation, all the pixels included in the peak are distinguished into the dyed regions, and the result consistent with the actual state can be obtained.

又,基於以上述方式決定之臨限值,原圖像被區分為染色區域與非染色區域,藉此可不依賴於用戶之肉眼觀察,而藉由圖像處理自動識別染色區域與非染色區域。 Further, based on the threshold determined in the above manner, the original image is divided into a dyed region and a non-stained region, whereby the dyed region and the non-stained region can be automatically recognized by image processing without depending on the naked eye of the user.

又,製作賦予有於相當於染色區域之像素與相當於非染色區域之像素互不相同之像素值之二值化圖像,藉此可給用戶提供能夠容易地視認染色區域及非染色區域之分佈狀態之圖像。 Further, by creating a binarized image in which pixel values corresponding to pixels corresponding to the dyed region and pixels corresponding to the non-stained region are different from each other, it is possible to provide the user with easy visibility of the dyed region and the non-stained region. An image of the distribution state.

如以上所說明般,於該實施形態之圖像處理裝置100中,攝像部1、圖像處理部2及UI部3分別作為本發明之「圖像取得構件」、「圖像處理構件」及「輸出構件」發揮功能。又,攝像部1亦作為本發明之「攝像部」發揮功能,顯示器32作為本發明之「顯示部」發揮功能。 As described above, in the image processing apparatus 100 of the embodiment, the imaging unit 1, the image processing unit 2, and the UI unit 3 are respectively the "image acquisition means" and the "image processing means" of the present invention. The "output component" functions. Further, the imaging unit 1 also functions as the "imaging unit" of the present invention, and the display 32 functions as the "display unit" of the present invention.

再者,本發明並不限定於上述實施形態,只要不脫離其主旨,便可於上述內容以外進行各種變更。例如,上述實施形態之圖像處理裝置100具備作為本發明之「圖像取得構件」之攝像部1,但本發明亦可適用於本身不具有對試樣進行拍攝之功能之圖像處理裝置。即,本發明之圖像處理裝置亦可為接收利用外部之攝像裝置拍攝之原圖像之圖像資料,並對該原圖像執行上述處理之態樣。 It is to be noted that the present invention is not limited to the above-described embodiments, and various modifications may be made without departing from the spirit and scope of the invention. For example, the image processing device 100 of the above-described embodiment includes the imaging unit 1 as the "image acquisition means" of the present invention. However, the present invention is also applicable to an image processing apparatus that does not have a function of capturing a sample. That is, the image processing apparatus of the present invention may be configured to receive image data of an original image captured by an external imaging device and perform the above-described processing on the original image.

於該情形時,自外部裝置接收圖像資料之介面作為本發明之「圖像取得構件」之「接收部」發揮功能。於上述實施形態中,圖像處理部2之介面23承擔該功能,藉此與藉由攝像部1攝像所得之原圖像同樣地,對於利用外部拍攝所得之原圖像亦可進行處理。 In this case, the interface for receiving image data from the external device functions as the "receiving portion" of the "image acquisition means" of the present invention. In the above embodiment, the interface 23 of the image processing unit 2 assumes this function, and similarly to the original image captured by the imaging unit 1, the original image obtained by external imaging can be processed.

再者,不包含攝像功能之本發明之實施態樣如上所述亦可藉由通用之個人電腦或工作站等硬體與用以於該硬體實現本發明之處理演算法之軟體之組合而實現。即,可藉由於通用硬體安裝基於本發明之技術思想之控制程式,實施本發明。 Furthermore, the embodiment of the present invention which does not include the camera function can also be realized by a combination of a hardware such as a general-purpose personal computer or a workstation and a software for realizing the processing algorithm of the present invention with the hardware as described above. . That is, the present invention can be implemented by a general hardware mounting control program based on the technical idea of the present invention.

又,上述實施形態之圖像處理裝置100具有顯示作為圖像處理之結果而獲得之二值化圖像之顯示器32。然而,關於圖像處理之結果, 並非僅僅二值化並輸出,例如,亦可對原圖像,實施賦予於被區分為染色區域之區域與被區分為非染色區域之區域不同之視覺資訊之圖像處理並將其輸出。又,對於顯示圖像處理後之圖像之功能亦可由外部之顯示裝置承擔,向該顯示裝置輸出圖像處理結果。又,亦可向外部之演算裝置輸出結果。於上述實施形態中,圖像處理部2之介面23可作為負責向外部之資料輸出之本發明之「輸出構件」發揮功能,藉此達成此種目的。 Further, the image processing apparatus 100 of the above embodiment has a display 32 for displaying a binarized image obtained as a result of image processing. However, regarding the results of image processing, It is not only binarized and outputted, for example, image processing for giving visual information different from the region classified into the dyed region and the region classified as the non-stained region may be performed on the original image and output. Further, the function of displaying the image after the image processing can be performed by an external display device, and the image processing result is output to the display device. Moreover, the result can also be output to an external calculation device. In the above embodiment, the interface 23 of the image processing unit 2 can function as an "output member" of the present invention which is responsible for outputting data to the outside, thereby achieving such an object.

又,於上述實施形態中,基於與像素越亮值越大之像素之亮度相當之像素值進行處理。相應地,例如,使用以圖像濃度越高,即像素越暗值越大之方式定義之像素值,同樣地亦可進行處理。 Further, in the above embodiment, the processing is performed based on the pixel value corresponding to the brightness of the pixel whose pixel is brighter. Accordingly, for example, a pixel value defined in such a manner that the image density is higher, that is, the darker pixel value is larger, can be similarly processed.

又,於本說明書中,為易於理解發明之原理而例示頻佈圖進行說明,但於實際之處理中,若求出頻度分佈,則可自其結果直接檢測出頻佈圖上之波峰及波谷。因此,於本發明中,製作頻佈圖本身並非必須之要件。 Further, in the present specification, the frequency layout is illustrated for easy understanding of the principle of the invention. However, in the actual processing, if the frequency distribution is obtained, the peaks and troughs on the frequency layout can be directly detected from the result. . Therefore, in the present invention, the production of the frequency layout itself is not an essential requirement.

本發明可較佳地適用於自包含已染色之細胞之原圖像區別已染色之區域與未染色之區域之目的,例如尤其適於醫療及生物化學領域之實驗、觀察。 The present invention is preferably applicable to the purpose of distinguishing between dyed regions and unstained regions from original images containing stained cells, such as experiments and observations particularly suitable for medical and biochemical fields.

Claims (11)

一種臨限值決定方法,其係自對已染色之細胞進行拍攝所得之原圖像,決定用以區別已染色之染色區域與未染色之非染色區域之像素值之臨限值,且具備:取得上述原圖像之步驟;求出構成上述原圖像之各像素之像素值之頻度分佈之步驟;特定出與上述頻度分佈對應之頻佈圖中之波峰及波谷之步驟:以及根據上述頻佈圖設定上述臨限值之步驟,當所特定之上述波谷為多個時,針對各個上述波谷評價從上述頻佈圖中夾著該波谷之2個上述波峰所見之深度,將與深度最大的一個波谷之位置對應之像素值設定為上述臨限值。 A threshold determining method for determining a threshold value for distinguishing pixel values of a dyed stained region from an unstained non-stained region by using an original image obtained by photographing the stained cells, and having: a step of obtaining the original image; a step of determining a frequency distribution of pixel values of each pixel constituting the original image; and a step of specifying a peak and a trough in a frequency distribution map corresponding to the frequency distribution: and according to the frequency The step of setting the threshold value is such that when the plurality of specific valleys are specified, the depths of the two peaks sandwiching the trough from the frequency map are evaluated for each of the troughs, and the depth is the largest. The pixel value corresponding to the position of one trough is set to the above threshold. 如請求項1之臨限值決定方法,其中將與將於上述頻佈圖中夾著一個上述波谷之2個上述波峰連接起來之假想線段和通過該波谷與頻度軸平行之假想線段之交點相當的頻度之值、與和該波谷相當之頻度之值的差,作為該波谷之深度之指標值。 A method for determining a threshold value according to claim 1, wherein an imaginary line segment connected to two of said peaks sandwiching one of said valleys in said frequency distribution map and an intersection of imaginary line segments parallel to said frequency axis and said frequency axis are equivalent The difference between the value of the frequency and the value of the frequency corresponding to the trough is the index value of the depth of the trough. 如請求項1之臨限值決定方法,其中基於上述像素所取得之全部像素值中,與數值形成等差數列之一部分像素值對應之頻度分佈,特定出上述波峰及上述波谷。 The threshold value determining method according to claim 1, wherein the peak and the trough are specified based on a frequency distribution corresponding to a partial pixel value of one of the arithmetic progression values based on the pixel values obtained by the pixel. 如請求項1之臨限值決定方法,其中當於上述頻佈圖中上述波谷為1個時,將相當於該波谷之像素值作為上述臨限值。 The threshold value determining method according to claim 1, wherein when the number of the valleys is one in the frequency distribution map, a pixel value corresponding to the valley is used as the threshold value. 如請求項1之臨限值決定方法,其中當於上述頻佈圖中不存在上述波谷時,將上述圖像中亮度最高之像素之像素值作為上述臨限值。 The threshold value determining method according to claim 1, wherein when the trough does not exist in the frequency distribution map, a pixel value of a pixel having the highest luminance in the image is used as the threshold value. 一種圖像處理方法,其具備:藉由如請求項1至5中任一項之臨 限值決定方法決定上述臨限值之步驟;及基於上述臨限值,將上述原圖像區分為上述染色區域與上述非染色區域之步驟。 An image processing method comprising: by any one of claims 1 to 5 The step of determining the threshold value by the limit value determining method; and the step of dividing the original image into the dyed region and the non-stained region based on the threshold value. 如請求項6之圖像處理方法,其具備如下步驟,即將被區分為上述染色區域之上述像素之像素值設定為第1值,另一方面將被區分為上述非染色區域之上述像素之像素值設定為與上述第1值不同之第2值,製作對上述原圖像進行二值表現所得之二值化圖像。 The image processing method of claim 6, comprising the step of setting a pixel value of the pixel divided into the dyed region to a first value, and dividing the pixel of the pixel into the non-stained region on the other hand. The value is set to a second value different from the first value described above, and a binarized image obtained by performing binary expression on the original image is created. 一種圖像處理裝置,其具備:圖像取得構件,其取得對已染色之細胞進行拍攝所得之原圖像;圖像處理構件,其對上述原圖像中之已染色之染色區域與未染色之非染色區域實施互不相同之圖像處理;及輸出構件,其輸出藉由上述圖像處理構件而獲得之處理結果;且上述圖像處理構件求出構成上述原圖像之各像素之像素值之頻度分佈,特定出與上述頻度分佈對應之頻佈圖中之波峰及波谷,並根據上述頻佈圖設定上述臨限值,當所特定之上述波谷為多個時,針對各個上述波谷評價從上述頻佈圖中夾著該波谷之2個上述波峰所見之深度,將與深度最大的一個波谷之位置對應之像素值作為臨限值,而將上述原圖像區分為上述染色區域與上述非染色區域。 An image processing apparatus comprising: an image acquisition means for acquiring an original image obtained by imaging a stained cell; and an image processing means for dyeing the dyed area and the undyed image in the original image The non-stained areas perform different image processing; and the output means outputs the processing result obtained by the image processing means; and the image processing means obtains pixels of the pixels constituting the original image The frequency distribution of the values specifies peaks and troughs in the frequency distribution map corresponding to the frequency distribution, and sets the threshold value according to the frequency distribution map. When the specified plurality of valleys are plural, the evaluation of each of the valleys is performed. The pixel value corresponding to the position of one of the valleys having the largest depth is regarded as a threshold value from the depth seen by the two peaks of the valley in the above-mentioned frequency distribution diagram, and the original image is divided into the dyed area and the above Non-stained area. 如請求項8之圖像處理裝置,其中上述圖像處理構件基於上述臨限值製作對上述原圖像進行二值表現之二值化圖像,且上述輸出構件具有顯示上述二值化圖像之顯示部。 The image processing device of claim 8, wherein the image processing means creates a binarized image that performs binary representation on the original image based on the threshold value, and the output member has the display of the binarized image The display unit. 如請求項8之圖像處理裝置,其中上述圖像取得構件具有對上述細胞進行拍攝並生成上述原圖像之攝像部。 The image processing device according to claim 8, wherein the image acquisition means has an imaging unit that images the cells and generates the original image. 如請求項8之圖像處理裝置,其中上述圖像取得構件具有自外部裝置接收上述原圖像之圖像資料之接收部。 The image processing device of claim 8, wherein the image acquisition means has a receiving portion that receives image data of the original image from an external device.
TW104122067A 2014-08-18 2015-07-07 Threshold determining method, image processing method and image processing device TWI645176B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2014165692A JP6355476B2 (en) 2014-08-18 2014-08-18 Threshold determination method, image processing method, and image processing apparatus
JP2014-165692 2014-08-18

Publications (2)

Publication Number Publication Date
TW201617599A TW201617599A (en) 2016-05-16
TWI645176B true TWI645176B (en) 2018-12-21

Family

ID=55350495

Family Applications (1)

Application Number Title Priority Date Filing Date
TW104122067A TWI645176B (en) 2014-08-18 2015-07-07 Threshold determining method, image processing method and image processing device

Country Status (3)

Country Link
JP (1) JP6355476B2 (en)
TW (1) TWI645176B (en)
WO (1) WO2016027542A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7653267B2 (en) * 2021-02-12 2025-03-28 株式会社Screenホールディングス Threshold determination method
WO2023199617A1 (en) * 2022-04-10 2023-10-19 株式会社ニコン Detecting device, detecting method, and detecting program
CN115205816A (en) * 2022-06-29 2022-10-18 湖州师范学院 Obstacle detection method, apparatus, and computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH096957A (en) * 1995-06-23 1997-01-10 Toshiba Corp Binarization method of density image and image binarization apparatus
US5881166A (en) * 1996-11-21 1999-03-09 Xerox Corporation Method and system for generating a histogram of a scanned image
JP2003004608A (en) * 1997-04-18 2003-01-08 Applied Spectral Imaging Ltd Chromosome classifying method
US20130182936A1 (en) * 2010-09-30 2013-07-18 Nec Corporation Information processing device, information processing system, information processing method, program, and recording medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH087150B2 (en) * 1987-03-14 1996-01-29 株式会社フジワラテクノアート Method and apparatus for quantitative analysis of koji substrate
JPH0492982A (en) * 1990-08-03 1992-03-25 Fujitsu Ltd Binary picture read-out method and device
JPH0628453A (en) * 1992-07-07 1994-02-04 Hitachi Ltd Microorganism recognizing device and monitoring method by the device
JP3175518B2 (en) * 1995-01-31 2001-06-11 株式会社日立製作所 Microbial monitoring device
JP2002312761A (en) * 2001-04-12 2002-10-25 Matsushita Electric Ind Co Ltd Image processing method for cell images
CN1213592C (en) * 2001-07-31 2005-08-03 佳能株式会社 Adaptive two-valued image processing method and equipment
JP2009210409A (en) * 2008-03-04 2009-09-17 Kddi Corp Method and device for image area division
CN101403743B (en) * 2008-10-31 2012-07-18 广东威创视讯科技股份有限公司 Automatic separating method for X type overlapping and adhering chromosome
JP5449444B2 (en) * 2012-04-23 2014-03-19 株式会社エルメックス Colony counting device, colony counting method, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH096957A (en) * 1995-06-23 1997-01-10 Toshiba Corp Binarization method of density image and image binarization apparatus
US5881166A (en) * 1996-11-21 1999-03-09 Xerox Corporation Method and system for generating a histogram of a scanned image
JP2003004608A (en) * 1997-04-18 2003-01-08 Applied Spectral Imaging Ltd Chromosome classifying method
US20130182936A1 (en) * 2010-09-30 2013-07-18 Nec Corporation Information processing device, information processing system, information processing method, program, and recording medium

Also Published As

Publication number Publication date
JP2016041032A (en) 2016-03-31
TW201617599A (en) 2016-05-16
WO2016027542A1 (en) 2016-02-25
JP6355476B2 (en) 2018-07-11

Similar Documents

Publication Publication Date Title
JP6122817B2 (en) Spheroid evaluation method and spheroid evaluation apparatus
JP7087048B2 (en) Cell image evaluation device and cell image evaluation program
JP5355275B2 (en) Cell image analyzer
Sommer et al. Learning-based mitotic cell detection in histopathological images
JP5387146B2 (en) Pathological tissue image analysis apparatus, pathological tissue image analysis method, pathological tissue image analysis program
CN108416766B (en) Double-side light-entering type light guide plate defect visual detection method
US20120207379A1 (en) Image Inspection Apparatus, Image Inspection Method, And Computer Program
CN102393959A (en) Image processing apparatus, image processing method, and image processing program
JP2010055573A (en) Imaging apparatus, image analyzing device, external light intensity calculation method, image analysis method, imaging program, image analysis program and recording medium
KR20170083066A (en) Stain evaluation device, stain evaluation method, and program
TWI645176B (en) Threshold determining method, image processing method and image processing device
WO2019181072A1 (en) Image processing method, computer program, and recording medium
Ancin-Murguzur et al. Automated image analysis tool to measure microbial growth on solid cultures
JP2006507579A (en) Histological evaluation of nuclear polymorphism
JP2016202442A (en) Image processing method and image processing program of capillary blood vessel as well as capillary blood vessel analysis diagnostic device
Spaepen et al. Digital image processing of live/dead staining
EP4001890B1 (en) Particle quantitative measurement device
JP2014071556A (en) Image processor, image processing method, and program
Kang et al. Dental plaque quantification using mean-shift-based image segmentation
CN102611821A (en) Automatic dynamic range detection method of reflection scanner
JP7254283B2 (en) Threshold determination method, image processing method, specimen image evaluation method, computer program and recording medium
JP5449444B2 (en) Colony counting device, colony counting method, and program
CN117616453A (en) Cell image analysis methods
CN106462964A (en) Method for segmenting a color image and digital microscope
Sciarabba et al. Automated lipid droplets recognition in human steatotic liver: some preliminary results