久久久久久久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 檢測圖像中矩形的中心和角度)
主站蜘蛛池模板: www.黄色网| 国产精品免费观看视频 | 久热精品在线 | 黄色片大全在线观看 | 日韩欧美在线免费观看 | 成人在线免费观看 | 中文精品久久 | 国产高清免费 | 亚洲综合第一页 | 九九精品久久久 | 亚洲3p | www.久久国产精品 | 一级片免费在线观看 | 97久久精品午夜一区二区 | 免费国产视频 | 久久精品中文字幕 | 一区二区三区欧美 | 国产一级片免费视频 | 日本精品视频一区二区三区四区 | 国产91久久久久蜜臀青青天草二 | 亚洲伊人a | 午夜欧美一区二区三区在线播放 | 国产精品伦一区二区三级视频 | 久久久久久久久99精品 | 手机看黄av免费网址 | 日韩一区在线视频 | 日本精品视频在线观看 | 精品久久影院 | 丁香综合 | 一区二区在线免费观看视频 | 成人在线精品视频 | 欧美三级电影在线播放 | 天天av网 | 完全免费av在线 | 国产精品一区二区三 | 97精品超碰一区二区三区 | 精品视频亚洲 | av片免费| 欧美精品一区在线发布 | 一区二区在线 | 99精品国产一区二区三区 |