久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

簡單的物體識別

Simple object recognition(簡單的物體識別)
本文介紹了簡單的物體識別的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

===已解決===

感謝您的建議和意見.通過研究 Beginning Python Visualization 一書(第 9 章 - 圖像處理)中給出的 flood_fill 算法) 我已經實現了我想要的.我可以計算對象,獲取每個對象的封閉矩形(因此是高度和寬度),最后可以為每個對象構造 NumPy 數組或矩陣.

Thanks for your suggestions and comments. By working on the flood_fill algorithm given in Beginning Python Visualization book (Chapter 9 - Image Processing) I have implemented what I have wanted. I can count the objects, get enclosing rectangles for each object (therefore height and widths), and lastly can construct NumPy arrays or matrices for each of them.

雖然它不是一種優化的方法,但它可以滿足我的需求.我使用的源代碼 (lab2.py) 和 png 文件 (lab2-particles.png) 已放在 http://code.google.com/p/ccnworks/source/browse/#svn/trunk/AtSc450.

Although it is not an optimized approach it does what I want. The source code (lab2.py) and the png file (lab2-particles.png) that I use have been put under http://code.google.com/p/ccnworks/source/browse/#svn/trunk/AtSc450.

您需要安裝 NumPy 和 PIL,并使用 matplotlib 來查看直方圖.代碼的核心位于 objfind 函數中,主要的遞歸對象搜索動作發生在該函數中.

You need NumPy and PIL installed, and matplotlib to see the histogram. Core of the code lies within the objfind function where the main recursive object search action occurs.

進一步更新:

SciPy 的 ndimage.label() 也完全符合我的要求.

SciPy's ndimage.label() does exactly what I want, too.

為 NumPy 和 SciPy 郵件列表中的 David-Warde FarleyZachary Pincus 歡呼:)

Cheers for David-Warde Farley and Zachary Pincus from the NumPy and SciPy mailing-lists for pointing this right into my eyes :)

=============

你好,

我有一張圖像,其中包含由粒子光譜儀測量的冰粒子的陰影.我希望能夠識別每個對象,以便以后可以在計算中進一步分類和使用它們.

I have an image that contains the shadows of ice particles measured by a particle spectrometer. I want to be able to identify each object, so that I can later classify and use them further in my calculations.

本質上,我愿意做的是簡單地實現一個模糊選擇工具,在這里我可以簡單地選擇每個實體.

In essence, what I am willing to do is to simply implement a fuzzy selection tool where I can simply select each entity.

我怎樣才能輕松解決這個問題?(最好使用 Python)

How could I easily solve this problem? (Preferably using Python)

謝謝.

注意:在我的問題中,我將每個特定的連接像素稱為對象或實體.我打算提取它們并創建 NumPy 數組表示,如下所示.(這里我使用左上角的對象;如果存在像素,則使用 1,如果不使用 0.該對象的形狀是 3 x 3,對應的 3 像素高 x 3 像素寬.這些是真實冰粒子在 2D 域上的投影, 假設它們是球形的,等效半徑為 (height+width)/2,之后會進行一些縮放——從像素到實際大小和體積計算)

NOTE: In my question I am referring to each specific connected pixels as objects or entities. My intention to extract them and create NumPy array representations as shown below. (Here I am using the top-left object; if a pixel exist use 1's if not use 0's. This object's shape is 3 by 3 which correspondingly 3 pixel height by 3 pixel width. These are projections of real ice-particles onto 2D domain, under the assumption of their being spherical and equivalent radius is (height+width)/2, and later some scalings --from pixels to actual sizes and volume calculations will follow)

import numpy as np

np.array([[1,1,1], [1,1,1], [0,0,1]])

array([[1, 1, 1],
       [1, 1, 1],
       [0, 0, 1]])

這是我將要使用的圖片中的一部??分.

Here is a section from the image which I am going to use.

截圖 http://img43.imageshack.us/img43/2327/particles.png

推薦答案

  1. 掃描每個方格(例如從左上角、從左到右、從上到下)

  1. Scan every square (e.g. from the top-left, left-to-right, top-to-bottom)

當你擊中一個藍色方塊時:

When you hit a blue square then:

一個.將此方格記錄為新對象的位置

a. Record this square as a location of a new object

b.找到所有其他相鄰的藍色方塊(例如通過查看該方塊的鄰居以及這些鄰居的鄰居等)并將它們標記為同一對象的一部分

b. Find all the other contiguous blue squares (e.g. by looking at the neighbours of this square, and the neighbours of those neighbours, etc.) and mark them as being part of the same object

繼續掃描

當你找到另一個藍色方塊時,在進行第 2 步之前測試它是否是已知對象的一部分;或者,在步驟 2b 中,將任何正方形與對象關聯后擦除它

When you find another blue square, test to see whether it's part of a known object before going to step 2; alternatively in step 2b, erase any square after you've associated it with an object

這篇關于簡單的物體識別的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How to draw a rectangle around a region of interest in python(如何在python中的感興趣區域周圍繪制一個矩形)
How can I detect and track people using OpenCV?(如何使用 OpenCV 檢測和跟蹤人員?)
How to apply threshold within multiple rectangular bounding boxes in an image?(如何在圖像的多個矩形邊界框中應用閾值?)
How can I download a specific part of Coco Dataset?(如何下載 Coco Dataset 的特定部分?)
Detect image orientation angle based on text direction(根據文本方向檢測圖像方向角度)
Detect centre and angle of rectangles in an image using Opencv(使用 Opencv 檢測圖像中矩形的中心和角度)
主站蜘蛛池模板: 日韩免费在线 | 99精品电影| 国产影音先锋 | 麻豆一区 | 丁香六月伊人 | 欧美国产91 | 91一区二区在线观看 | 精久久久 | 二区三区视频 | 欧美日韩视频在线 | 国产精品免费一区二区三区 | 亚洲三级在线观看 | 久久久久亚洲国产| 最新中文字幕 | 日韩网站在线观看 | 国产女人与拘做视频免费 | 午夜在线影院 | 超碰在线播 | 国产精品久久久久久久三级 | 成人a免费 | 国产乱一区二区三区视频 | 最新国产精品精品视频 | 欧洲成人 | 黑人巨大精品欧美一区二区一视频 | 在线播放精品视频 | 国产精品日日摸夜夜添夜夜av | 久优草| 午夜免费视频 | 国产高清精品在线 | 成人在线看片 | 国产精品亚洲综合 | 色就是色欧美 | 亚洲444kkkk在线观看最新 | 日韩在线观看视频一区 | 在线国产视频 | 国产欧美一区二区三区另类精品 | 午夜视频在线 | 99精品99久久久久久宅男 | 91综合在线观看 | 中文字幕免费观看 | 黄网免费 |