02-03-2010 10:06 PM
在我程式的目的是辨識LED發光的顏色,但是須先判別是否有發光。
因此,我使用了第一個ExtractColorPlane去取出Luminance資訊,再統計其直方圖,判斷Mean值是否有大於某臨界值(不發光則Mean極低)
若滿足上面這個敘述,則對LED影像做第二個ExtractColorPlane動作,主要是取出Hue資訊,再根據角度判斷色光。
但是在第二個ExtractColorPlane就發生Invalid Image Type的錯誤訊息。
這讓我有些不解,因為不論是Luminance或Hue,其來源都須是Color Image,這方面我可以肯定是正確的。
因為這兩次ExtractColorPlane中的Image Source 都是分開拉的,相當於原始彩色影像分兩路一樣,而接續的Histogram使用的ROI Descriptor也是相同的。
所以發生這錯誤讓我不知道是觀念還是邏輯錯誤。但是若我將這兩個ExtractColorPlane取消其中一個時,程式又會正常運行....
所以想請前輩指教,看問題是出在哪邊呢?
附件為程式片段與發生錯誤點訊息。
02-04-2010 07:31 PM
02-04-2010 09:07 PM
This is desired heavier of you block.
Reason: You haven't give the ExtractColorPlane VI a Image Dst Input.
SO: The Image will be operated on itself, you can use a VI like this to view the information of the Image, you can find out after ExtractColorPlane VI, the Image Src becomes a U8 Grayscale image.
And you can then use a VI like this, you can find out after ExtractColorPlane VI, the Image Src remains the HSL image, because you gave it a new Dst image.
PS: Please post in English on this Board