參照圖1,係為本發明依據一些實施例之電梯乘載空間偵測系統10的方塊示意圖。電梯乘載空間偵測系統10包含一儲存裝置11、一處理器13及一攝影裝置15。處理器13電性連接儲存裝置11及攝影裝置15。攝影裝置15用以拍攝一電梯,以產生一影像。攝影裝置15可以設置在電梯內之電梯門的對面牆壁的頂部角落處。攝影裝置15是朝向電梯門拍攝。攝影裝置15的鏡頭可以是廣角鏡頭,例如攝影裝置15的鏡頭之視角可以為170度。如此,攝影裝置15所產生的影像即可涵蓋電梯內部的所有範圍。當攝影裝置15實時地拍攝電梯時,是產生電梯的實時影像。例如,當電梯的電梯門當前是半開、關閉或是電梯具有乘客時,實時影像呈現有半開的電梯門、關閉的電梯門或是人影。攝影裝置15可以為相機、攝影機、或是具有攝影功能的裝置。儲存裝置11可以是非暫態儲存媒體(例如傳統硬碟、固態硬碟、快閃記憶體、或光碟等)或是暫態儲存媒體(例如隨機存取記憶體)。處理器13可以為中央處理器、微處理器、特定應用積體電路(Application-specific Integrated Circuit,ASIC)、或系統單晶片(System on a Chip,SOC)等運算電路。Referring to FIG. 1 , it is a schematic block diagram of an elevator passenger space detection system 10 according to some embodiments of the present invention. The elevator passenger space detection system 10 includes a storage device 11 , a processor 13 and a camera device 15 . The processor 13 is electrically connected to the storage device 11 and the camera device 15 . The photographing device 15 is used to photograph an elevator to generate an image. The photographing device 15 can be arranged at the top corner of the wall opposite the elevator door in the elevator. The photographing device 15 photographs towards the elevator door. The lens of the photographing device 15 may be a wide-angle lens, for example, the viewing angle of the lens of the photographing device 15 may be 170 degrees. In this way, the images generated by the photographing device 15 can cover all areas inside the elevator. When the photographing device 15 photographs the elevator in real time, it generates a real-time image of the elevator. For example, when the elevator doors of the elevator are currently half-opened, closed, or the elevator has passengers, the real-time image shows half-open elevator doors, closed elevator doors, or human figures. The photography device 15 may be a camera, a video camera, or a device with a photography function. The storage device 11 can be a non-transitory storage medium (such as a traditional hard disk, a solid state disk, a flash memory, or an optical disk, etc.) or a transient storage medium (such as a random access memory). The processor 13 may be a computing circuit such as a central processing unit, a microprocessor, an application-specific integrated circuit (Application-specific Integrated Circuit, ASIC), or a system on a chip (System on a Chip, SOC).
儲存裝置11用以儲存電梯的一關門空車廂影像30及關門空車廂影像30的一門座標與一地板座標。舉例來說,在電梯是空車廂(即不具有任何乘客)且電梯門是關閉的情形下,設計人員可以輸入一預處理指令至處理器13,處理器13響應預處理指令而控制攝影裝置15對電梯進行拍攝,以產生電梯的關門空車廂影像30。也就是說,關門空車廂影像30是電梯為空車廂且電梯門為關閉的影像。處理器13對關門空車廂影像30進行影像辨識而獲得關門空車廂影像30之有關電梯門的門座標及有關電梯地板(於後簡稱為地板)的地板座標。例如,門座標可以包含電梯門的四個角落的座標點,地板座標可以包含地板的四個角落的座標點。接著,處理器13將關門空車廂影像30、門座標及地板座標儲存至儲存裝置11。The storage device 11 is used for storing a door-closed and empty car image 30 of the elevator and a door coordinate and a floor coordinate of the door-closed and empty car image 30 . For example, in the case that the elevator is an empty car (i.e. does not have any passengers) and the elevator door is closed, the designer can input a preprocessing command to the processor 13, and the processor 13 controls the camera 15 in response to the preprocessing command The elevator is photographed to generate an image 30 of the elevator with its doors closed and empty. That is to say, the door-closed empty car image 30 is an image in which the elevator is an empty car and the elevator doors are closed. The processor 13 performs image recognition on the closed door and empty car image 30 to obtain the door coordinates of the relevant elevator door and the floor coordinates of the relevant elevator floor (hereinafter referred to as the floor) of the closed door and empty car image 30 . For example, the door coordinates may include the coordinate points of the four corners of the elevator door, and the floor coordinates may include the coordinate points of the four corners of the floor. Then, the processor 13 stores the image 30 of the empty compartment with the door closed, the coordinates of the door and the coordinates of the floor into the storage device 11 .
在一些實施例中,關門空車廂影像30係為將多個關門空車廂原始影像執行動態變化平均值運算而獲得。例如,處理器13可以控制攝影裝置15對電梯拍攝多個關門空車廂原始影像(即攝影裝置15拍攝電梯為空車廂且電梯門為關閉的影像,且該影像尚未進行任何影像處理),並對該些關門空車廂原始影像進行動態變化平均值運算,以產生關門空車廂影像30。舉一應用例進行說明,處理器13將25個關門空車廂原始影像進行動態變化平均值運算後,產生關門空車廂影像30。如此,可以減少關門空車廂影像30的雜訊問題(例如減少雜訊對關門空車廂影像30所造成的成色影響),並提升門座標及地板座標的精準度。In some embodiments, the closed door and empty car image 30 is obtained by performing dynamic average calculation on a plurality of closed door and empty car original images. For example, the processor 13 can control the photographing device 15 to take a plurality of original images of closed doors and empty cars of the elevator (that is, the photographing device 15 shoots an image of the elevator being an empty car and the elevator door is closed, and the image has not been subjected to any image processing), and The original images of the closed doors and empty carriages are subjected to dynamic average calculation to generate the closed doors and empty carriage images 30 . An application example is used for illustration. The processor 13 generates the image 30 of the closed and empty car after performing dynamic average calculation on the 25 original images of the closed door and empty car. In this way, the noise problem of the closed-door and empty-car image 30 can be reduced (for example, the influence of noise on the color quality of the closed-door and empty-car image 30 can be reduced), and the accuracy of the door coordinates and floor coordinates can be improved.
參照圖2,係為本發明依據一些實施例之電梯乘載空間偵測方法的流程示意圖。電梯乘載空間偵測方法適於由處理器13執行。首先,處理器13依據門座標及關門空車廂影像,獲得多個關門特徵(步驟S201),並依據門座標及實時影像,獲得多個實時門特徵(步驟S203)。由於關門空車廂影像及實時影像可以是同一攝影裝置15在固定的位置拍攝電梯內部而得,因此電梯門在關門空車廂影像及實時影像中是呈現於同一位置。也就是說,關門空車廂影像及實時影像具有同一門座標。該些關門特徵及該些實時門特徵是關聯於電梯的電梯門。例如,每一關門特徵可以是關於電梯門之不同區域在關門空車廂影像中呈現的顏色、輪廓、及/或材質,每一實時門特徵可以是關於電梯門之不同區域在實時影像中呈現的顏色、輪廓、及/或材質。Referring to FIG. 2 , it is a schematic flowchart of an elevator passenger space detection method according to some embodiments of the present invention. The elevator passenger space detection method is suitable to be executed by the processor 13 . Firstly, the processor 13 obtains a plurality of door closing features according to the door coordinates and the images of the closed and empty cars (step S201 ), and obtains a plurality of real-time door features according to the door coordinates and the real-time images (step S203 ). Since the door-closed empty car image and the real-time image can be obtained by the same photographing device 15 shooting inside the elevator at a fixed position, the elevator door is presented at the same position in the door-closed empty car image and the real-time image. That is to say, the door-closed and empty compartment image and the real-time image have the same door coordinates. The door closing features and the real-time door features are associated with elevator doors of the elevator. For example, each door-closing feature can be the color, contour, and/or material of different areas of the elevator door in the closed door and empty car image, and each real-time door feature can be related to different areas of the elevator door in the real-time image. Color, outline, and/or texture.
在獲得該些關門特徵及該些實時門特徵之後,處理器13依據該些關門特徵及該些實時門特徵,判斷電梯是否處於一半關狀態(亦可以稱為半開狀態)或是一關門狀態(步驟S205)。例如,在該些關門特徵皆相符於該些實時門特徵(例如,每一同一電梯門之區域下的關門特徵皆與實時門特徵相符)時,處理器13判斷電梯處於關門狀態。在該些關門特徵皆不相符於該些實時門特徵(例如,每一同一電梯門之區域下的關門特徵皆與實時門特徵不相符)時,處理器13判斷電梯處於全開狀態。在該些關門特徵中的至少一個與該些實時門特徵中的至少一個不相符(例如,至少一個同一電梯門之區域下的關門特徵與實時門特徵不相符)時,處理器13判斷電梯處於半關狀態。處理器13在判斷電梯未處於半關狀態或是關門狀態時(例如,處理器13判斷電梯處於全開狀態時),控制攝影裝置15重新拍攝新的實時影像,返回執行步驟S203以獲得新的實時影像之實時門特徵,並接續後續的步驟。處理器13在判斷電梯處於半關狀態或是關門狀態時,執行步驟S207~S215。由於電梯關門的速率一般是快速的,因此透過在處於半關狀態或關門狀態時皆執行步驟S207~S215,以確保在需要滿載模式時,滿載模式能被觸發。再者,由於電梯在全開狀態時,表示乘客正在進出電梯而無需觸發滿載模式,因此透過僅在電梯處於半關狀態或是關門狀態時執行步驟S207~S215,可以節省處理器13的運算資源。After obtaining these door closing features and these real-time door features, the processor 13 judges whether the elevator is in a half-closed state (also called a half-open state) or a closed door state ( Step S205). For example, when the door-closing features are consistent with the real-time door features (for example, the door-closing features under the same elevator door area are all consistent with the real-time door features), the processor 13 determines that the elevator is in the door-closing state. When the door-closing features do not match the real-time door features (for example, the door-closing features under the same elevator door area do not match the real-time door features), the processor 13 judges that the elevator is in a fully open state. When at least one of the door-closing features does not match at least one of the real-time door features (for example, at least one door-closing feature under the same elevator door area does not match the real-time door feature), the processor 13 judges that the elevator is in half off state. When the processor 13 judges that the elevator is not in a half-closed state or a door-closed state (for example, when the processor 13 judges that the elevator is in a fully-opened state), it controls the photography device 15 to re-shoot a new real-time image, and returns to step S203 to obtain a new real-time image. The real-time gate feature of the image, and continue the subsequent steps. When the processor 13 judges that the elevator is in a half-closed state or a door-closed state, it executes steps S207-S215. Since the door-closing rate of the elevator is generally fast, steps S207-S215 are executed when the elevator is in the half-closed state or the door-closed state to ensure that the full-load mode can be triggered when the full-load mode is required. Furthermore, since the elevator is in the fully open state, it means that passengers are getting in and out of the elevator without triggering the full load mode, so by executing steps S207-S215 only when the elevator is in the half-closed state or the door-closed state, the computing resources of the processor 13 can be saved.
在步驟S207中,處理器13依據地板座標及關門空車廂影像,獲得多個空地板特徵。在步驟S209中,處理器13依據地板座標及實時影像,獲得多個實時地板特徵。由於關門空車廂影像及實時影像可以是同一攝影裝置15在固定的位置拍攝電梯內部而得,因此地板在關門空車廂影像及實時影像中是呈現於同一位置。也就是說,關門空車廂影像及實時影像具有同一地板座標。該些空地板特徵及該些實時地板特徵關聯於電梯的地板。例如,每一空地板特徵可以是關於地板之不同區域在關門空車廂影像中呈現的顏色、輪廓、及/或材質,每一實時地板特徵可以是關於地板之不同區域在實時影像中呈現的顏色、輪廓、及/或材質。In step S207, the processor 13 obtains a plurality of empty floor features according to the floor coordinates and the image of the empty compartment with the door closed. In step S209, the processor 13 obtains a plurality of real-time floor features according to the floor coordinates and the real-time image. Since the image of the closed and empty car and the real-time image can be obtained by the same photographing device 15 shooting inside the elevator at a fixed position, the floor is presented at the same position in the image of the closed and empty car and the real-time image. That is to say, the image of the closed and empty compartment and the real-time image have the same floor coordinates. The empty floor features and the real-time floor features are associated with the floor of the elevator. For example, each empty floor feature may be the color, outline, and/or material of different areas of the floor in the closed-door and empty car image, and each real-time floor feature may be the color, contour, and/or material of different areas of the floor in the real-time image. profile, and/or texture.
在獲得該些空地板特徵及該些實時地板特徵且電梯處於半關狀態或是關門狀態時,處理器13依據該些空地板特徵及該些實時地板特徵,獲得一剩餘容留人數(步驟S211)。例如,處理器13依據該些空地板特徵相符於該些實時地板特徵的數量,獲得剩餘容留人數。具體來說,處理器13依據同一地板之區域下的空地板特徵相符於實時地板特徵所占有的數量來計算剩餘容留人數。在一些實施例中,處理器13可以將該些空地板特徵的數量或是該些實時地板特徵的數量減去該些空地板特徵不相符於該些實時地板特徵的數量,以計算得剩餘容留人數。其中,該些空地板特徵不相符於該些實時地板特徵的數量可以是,同一地板之區域下的空地板特徵不相符於實時地板特徵所占有的數量。在一些實施例中,處理器13可以將該些空地板特徵相符於該些實時地板特徵的數量(該些空地板特徵的數量或是該些實時地板特徵的數量減去該些空地板特徵不相符於該些實時地板特徵的數量)除以該些空地板特徵的數量或是該些實時地板特徵的數量,以計算得剩餘容留人數。When the empty floor features and the real-time floor features are obtained and the elevator is in a half-closed state or a door-closed state, the processor 13 obtains a remaining capacity according to the empty floor features and the real-time floor features (step S211) . For example, the processor 13 obtains the remaining capacity according to the number of the vacant floor characteristics matching the real-time floor characteristics. Specifically, the processor 13 calculates the remaining number of occupants according to the number of vacant floor features under the same floor area that match the real-time floor features. In some embodiments, the processor 13 may subtract the number of empty floor features that do not match the real-time floor features from the number of empty floor features or the number of real-time floor features to calculate the remaining capacity number of people. Wherein, the number of the empty floor features that do not match the real-time floor features may be the number of empty floor features under the same floor area that does not match the real-time floor features. In some embodiments, the processor 13 can match the empty floor features to the number of the real-time floor features (the number of the empty floor features or the number of the real-time floor features minus the number of the empty floor features The number corresponding to these real-time floor features) is divided by the number of these empty floor features or the number of these real-time floor features to calculate the remaining capacity.
在步驟S213中,處理器13判斷剩餘容留人數是否小於一滿載閾值。滿載閾值可以被預先儲存於儲存裝置11中。在剩餘容留人數不小於滿載閾值時,表示電梯並未乘載有大量的乘客或是電梯內的乘客人數並未達到上限,則處理器13控制攝影裝置15重新拍攝新的實時影像,返回執行步驟S203以獲得新的實時影像之實時門特徵,並接續後續的步驟。在剩餘容留人數小於滿載閾值時,表示電梯乘載有大量的乘客或是電梯內的乘客人數已達到上限,則處理器13啟動電梯的滿載模式(步驟S215)。在滿載模式時,處理器13控制電梯直達電梯內的乘客(使用者)所指定的樓層。In step S213, the processor 13 determines whether the remaining capacity is less than a full load threshold. The full load threshold can be pre-stored in the storage device 11 . When the remaining number of people is not less than the full load threshold, it means that the elevator does not carry a large number of passengers or the number of passengers in the elevator has not reached the upper limit, then the processor 13 controls the camera 15 to re-shoot a new real-time image, and returns to the execution step S203 Obtain the real-time gate feature of the new real-time image, and continue the subsequent steps. When the remaining capacity is less than the full-load threshold, it means that the elevator carries a large number of passengers or the number of passengers in the elevator has reached the upper limit, then the processor 13 starts the full-load mode of the elevator (step S215). In the full load mode, the processor 13 controls the elevator to go directly to the floor designated by the passengers (users) in the elevator.
因此,透過對關門空車廂影像及實時影像進行影像辨識(例如門特徵的擷取及地板特徵的擷取),對關門空車廂影像及實時影像之門特徵及地板特徵進行比較,並比較剩餘容留人數與滿載閾值,即可以確保在需要滿載模式時,電梯之滿載模式能被觸發。也就是說,可以避免在電梯內具有大量的乘客的情形下,電梯的滿載模式無法被觸發的問題。Therefore, by performing image recognition (such as door feature extraction and floor feature extraction) on the closed door empty car image and the real-time image, the door feature and floor feature of the closed door empty car image and the real-time image are compared, and the remaining capacity is compared. The number of people and the full load threshold can ensure that the full load mode of the elevator can be triggered when the full load mode is required. That is to say, the problem that the full load mode of the elevator cannot be triggered when there are a large number of passengers in the elevator can be avoided.
在一些實施例中,步驟S201及步驟S203的順序可以對調。在一些實施例中,步驟S207及步驟S209的順序可以對調。In some embodiments, the order of step S201 and step S203 can be reversed. In some embodiments, the order of step S207 and step S209 can be reversed.
參照圖3及圖4。圖3係為本發明依據一些實施例之關門空車廂影像30的示意圖。圖4係為本發明依據一些實施例之第一門影像31的示意圖。在步驟S201的一些實施例中,處理器13依據門座標,從關門空車廂影像30中擷取出有關電梯門的門影像(於後稱為第一門影像31)。處理器13將第一門影像31區分為多個第一門區塊33A~33D。為了方便說明,圖4僅繪製四個第一門區塊,但本發明並不以此為限。在一些實施例中,處理器13將第一門影像31以多個邊界區分為分別包含多個像素的多個第一門區塊33A~33D。每一第一門區塊33A~33D所包含的像素數量可為一致的,且每一第一門區塊33A~33D定義在第一門影像31中的不同的位置並且互相不重疊。換言之,相鄰的複數個像素組合成為一個第一門區塊。在一些實施例中,每一第一門區塊33A~33D包含由複數個像素組成的一像素矩陣(例如3*3的像素矩陣,亦即9個像素組合成的像素矩陣)。Refer to FIG. 3 and FIG. 4 . FIG. 3 is a schematic diagram of an image 30 of an empty car with a closed door according to some embodiments of the present invention. FIG. 4 is a schematic diagram of the first door image 31 according to some embodiments of the present invention. In some embodiments of step S201 , the processor 13 extracts a door image (hereinafter referred to as the first door image 31 ) related to the elevator door from the closed door and empty car image 30 according to the door coordinates. The processor 13 divides the first door image 31 into a plurality of first door blocks 33A˜33D. For convenience of illustration, only four first door blocks are drawn in FIG. 4 , but the present invention is not limited thereto. In some embodiments, the processor 13 divides the first door image 31 into a plurality of first door blocks 33A˜ 33D respectively including a plurality of pixels by a plurality of boundaries. The number of pixels included in each of the first door blocks 33A- 33D may be consistent, and each of the first door blocks 33A- 33D is defined in a different position in the first door image 31 and does not overlap with each other. In other words, a plurality of adjacent pixels are combined to form a first gate block. In some embodiments, each of the first gate blocks 33A- 33D includes a pixel matrix composed of a plurality of pixels (for example, a 3*3 pixel matrix, that is, a pixel matrix composed of 9 pixels).
接著,處理器13對每一第一門區塊33A~33D執行門特徵程序,以獲得分別對應該些第一門區塊33A~33D之該些關門特徵。在一些實施例中,門特徵程序包含門顏色程序、門輪廓程序及門材質程序。每一關門特徵包含第一門顏色特徵、第一門輪廓特徵及第一門材質特徵。其中,第一門顏色特徵是關於對應的第一門區塊在關門空車廂影像30中呈現的顏色,第一門輪廓特徵是關於對應的第一門區塊在關門空車廂影像30中呈現的輪廓,第一門材質特徵是關於對應的第一門區塊在關門空車廂影像30中呈現的材質。具體來說,透過對第一門區塊33A~33D執行門顏色程序,處理器13可以獲得第一門顏色特徵;透過對第一門區塊33A~33D執行門輪廓程序,處理器13可以獲得第一門輪廓特徵;及透過對第一門區塊33A~33D執行門材質程序,處理器13可以獲得第一門材質特徵。Next, the processor 13 executes the door feature program on each of the first door blocks 33A-33D to obtain the door-closing features respectively corresponding to the first door blocks 33A-33D. In some embodiments, the door feature programs include a door color program, a door outline program, and a door material program. Each door closing feature includes a first door color feature, a first door outline feature and a first door material feature. Wherein, the first door color feature is the color presented by the corresponding first door block in the closed door empty car image 30, and the first door outline feature is presented by the corresponding first door block in the closed door empty car image 30 The contour, first door material feature is the material presented in the closed door empty car image 30 with respect to the corresponding first door block. Specifically, by executing the door color program on the first door blocks 33A~33D, the processor 13 can obtain the first door color feature; by executing the door outline program on the first door blocks 33A~33D, the processor 13 can obtain The first door outline feature; and by executing the door material program on the first door blocks 33A-33D, the processor 13 can obtain the first door material feature.
參照圖5及圖6。圖5係為本發明依據一些實施例之實時影像50的示意圖。圖6係為本發明依據一些實施例之第二門影像51的示意圖。與步驟S201相似地,在步驟S203的一些實施例中,處理器13依據門座標,從實時影像50中擷取出有關電梯門的門影像(於後稱為第二門影像51)。處理器13將第二門影像51區分為多個第二門區塊53A~53D。為了方便說明,圖6僅繪製四個第二門區塊,但本發明並不以此為限。在一些實施例中,處理器13將第二門影像51以多個邊界區分為分別包含多個像素的多個第二門區塊53A~53D。每一第二門區塊53A~53D所包含的像素數量可為一致的,且每一第二門區塊53A~53D定義在第二門影像51中的不同的位置並且互相不重疊。換言之,相鄰的複數個像素組合成為一個第二門區塊。在一些實施例中,每一第二門區塊53A~53D包含由複數個像素組成的一像素矩陣(例如3*3的像素矩陣,亦即9個像素組合成的像素矩陣)。在一些實施例中,如圖4及圖6所示,由於第一門影像31及第二門影像51之尺寸可以是相同的,且區分第一門區塊33A~33D及第二門區塊53A~53D的方式可以是相同的,因此第一門區塊33A~33D在第一門影像31中的位置是與第二門區塊53A~53D在第二門影像51中的位置相對應。Refer to FIG. 5 and FIG. 6 . FIG. 5 is a schematic diagram of a real-time image 50 according to some embodiments of the present invention. FIG. 6 is a schematic diagram of a second door image 51 according to some embodiments of the present invention. Similar to step S201 , in some embodiments of step S203 , the processor 13 retrieves a door image (hereinafter referred to as a second door image 51 ) related to the elevator door from the real-time image 50 according to the door coordinates. The processor 13 divides the second door image 51 into a plurality of second door blocks 53A˜53D. For convenience of illustration, FIG. 6 only draws four second door blocks, but the present invention is not limited thereto. In some embodiments, the processor 13 divides the second door image 51 into a plurality of second door blocks 53A˜ 53D respectively including a plurality of pixels by a plurality of boundaries. The number of pixels included in each of the second gate blocks 53A-53D may be consistent, and each of the second gate blocks 53A-53D are defined at different positions in the second gate image 51 and do not overlap with each other. In other words, a plurality of adjacent pixels are combined to form a second gate block. In some embodiments, each of the second gate blocks 53A- 53D includes a pixel matrix composed of a plurality of pixels (for example, a 3*3 pixel matrix, that is, a pixel matrix composed of 9 pixels). In some embodiments, as shown in FIG. 4 and FIG. 6 , since the size of the first door image 31 and the second door image 51 can be the same, and distinguish the first door blocks 33A~33D from the second door blocks The manners of 53A-53D may be the same, so the positions of the first door blocks 33A-33D in the first door image 31 correspond to the positions of the second door blocks 53A-53D in the second door image 51 .
接著,處理器13對每一第二門區塊53A~53D執行門特徵程序,以獲得分別對應該些第二門區塊53A~53D之該些實時門特徵。在一些實施例中,每一實時門特徵包含第二門顏色特徵、第二門輪廓特徵及第二門材質特徵。其中,第二門顏色特徵是關於對應的第二門區塊在實時影像50中呈現的顏色,第二門輪廓特徵是關於對應的第二門區塊在實時影像50中呈現的輪廓,第二門材質特徵是關於對應的第二門區塊在實時影像50中呈現的材質。具體來說,透過對第二門區塊53A~53D執行門顏色程序,處理器13可以獲得第二門顏色特徵;透過對第二門區塊53A~53D執行門輪廓程序,處理器13可以獲得第二門輪廓特徵;及透過對第二門區塊53A~53D執行門材質程序,處理器13可以獲得第二門材質特徵。Next, the processor 13 executes the gate feature program on each of the second gate blocks 53A-53D to obtain the real-time gate features respectively corresponding to the second gate blocks 53A-53D. In some embodiments, each real-time door feature includes a second door color feature, a second door outline feature, and a second door material feature. Wherein, the second door color feature is the color presented in the real-time image 50 with respect to the corresponding second door block, the second door outline feature is the outline presented in the real-time image 50 with respect to the corresponding second door block, and the second The door material feature is the material presented in the real-time image 50 with respect to the corresponding second door block. Specifically, by executing the door color program on the second door blocks 53A~53D, the processor 13 can obtain the second door color feature; by executing the door outline program on the second door blocks 53A~53D, the processor 13 can obtain The second door profile feature; and by executing the door material program on the second door blocks 53A-53D, the processor 13 can obtain the second door material feature.
前述門顏色程序可以是處理器13計算每一第一門區塊33A~33D的亮度平均值以作為每一第一門顏色特徵,並計算每一第二門區塊53A~53D的亮度平均值以作為每一第二門顏色特徵。每一第一門區塊33A~33D的亮度平均值可以是將每一第一門區塊33A~33D內的像素之三原色光值(RGB值)平均而得。每一第二門區塊53A~53D的亮度平均值可以是將每一第二門區塊53A~53D內的像素之RGB值平均而得。在一些實施例中,處理器13可以對關門空車廂影像30及實時影像50進行模糊(blurred)處理,以使相鄰的像素之間的RGB值差異較小。如此,單一第一門區塊33A~33D及單一第二門區塊53A~53D並不會受其內之像素之不同的RGB值影響而有大幅的變化。也就是說,可以提升比對關門特徵(例如第一門顏色特徵)是否與實時門特徵(例如第二門顏色特徵)相符的精準度。The aforementioned door color program can be that the processor 13 calculates the average brightness of each first door block 33A~33D as a feature of each first door color, and calculates the average brightness of each second door block 53A~53D Take as each second door color feature. The average brightness of each of the first gate blocks 33A-33D can be obtained by averaging the three primary color light values (RGB values) of the pixels in each of the first gate blocks 33A-33D. The average brightness of each second gate block 53A-53D can be obtained by averaging the RGB values of the pixels in each second gate block 53A-53D. In some embodiments, the processor 13 may perform blurring processing on the closed-door and empty-car image 30 and the real-time image 50 , so that the RGB value difference between adjacent pixels is small. In this way, the single first gate blocks 33A-33D and the single second gate blocks 53A-53D will not be affected by the different RGB values of the pixels therein and have large changes. That is to say, it is possible to improve the accuracy of comparing whether the door closing feature (such as the first door color feature) matches the real-time door feature (such as the second door color feature).
前述門輪廓程序及門材質程序可以由神經網路實現。舉例來說,設計人員可以透過輸出入介面(例如鍵盤、滑鼠、影像傳輸介面等)(圖未示)輸入多個電梯門的樣本影像至處理器13。處理器13依據樣本影像進行輪廓影像辨識的機器學習訓練,以決定出一第一判斷邏輯。相似地,處理器13依據樣本影像進行材質影像辨識的機器學習訓練,以決定出一第二判斷邏輯。其中,輪廓影像辨識的機器學習訓練及材質影像辨識的機器學習訓練可以是已知或是自行開發的模型,其細節在此省略。處理器13依據第一判斷邏輯及第一門區塊33A~33D,即可獲得第一門輪廓特徵;處理器13依據第一判斷邏輯及第二門區塊53A~53D,即可獲得第二門輪廓特徵。處理器13依據第二判斷邏輯及第一門區塊33A~33D,即可獲得第一門材質特徵;處理器13依據第二判斷邏輯及第二門區塊53A~53D,即可獲得第二門材質特徵。The aforementioned door contour program and door material program can be realized by neural network. For example, the designer can input a plurality of sample images of elevator doors to the processor 13 through an input/output interface (such as a keyboard, a mouse, an image transmission interface, etc.) (not shown in the figure). The processor 13 performs machine learning training for contour image recognition according to the sample images to determine a first judgment logic. Similarly, the processor 13 performs machine learning training for material image recognition according to the sample image to determine a second judgment logic. Wherein, the machine learning training for contour image recognition and the machine learning training for material image recognition can be known or self-developed models, the details of which are omitted here. The processor 13 can obtain the first door profile feature according to the first judgment logic and the first door blocks 33A~33D; the processor 13 can obtain the second door profile feature according to the first judgment logic and the second door blocks 53A~53D. Door outline feature. The processor 13 can obtain the material characteristics of the first door according to the second judgment logic and the first door blocks 33A~33D; the processor 13 can obtain the second door material characteristics according to the second judgment logic and the second door blocks 53A~53D. Door material characteristics.
如圖4及圖6所示,在步驟S205的一些實施例中,處理器13依據該些第一門區塊33A~33D於第一門影像31的位置及該些第二門區塊53A~53D於第二門影像51的位置,比對在同一位置下的每一第一門區塊33A~33D所對應的關門特徵與每一第二門區塊53A~53D所對應的實時門特徵是否相符,將不符的每一實時門特徵所對應的第二門區塊的像素大小進行計算而產生一門縫面積,並依據門縫面積判斷電梯是否處於半關狀態或是關門狀態。As shown in FIG. 4 and FIG. 6, in some embodiments of step S205, the processor 13 bases the positions of the first door blocks 33A~33D on the first door image 31 and the positions of the second door blocks 53A~33D 53D at the position of the second door image 51, comparing the door closing features corresponding to each of the first door blocks 33A~33D and the real-time door features corresponding to each of the second door blocks 53A~53D at the same position If they match, calculate the pixel size of the second door block corresponding to each real-time door feature that does not match to generate a door gap area, and judge whether the elevator is in a half-closed state or a door-closed state based on the door gap area.
以第二門影像51呈現半開的電梯門為例進行說明。圖4之區域34及區域35皆為電梯門之門內影像。圖6之區域54為電梯門之門外影像,區域55為電梯門之門內影像。第一門區塊33A~33C分別與第二門區塊53A~53C對應同一位置,且第一門區塊33A~33C及第二門區塊53A~53C分別位於區域35及區域55。第一門區塊33D與第二門區塊53D是對應同一位置,且第一門區塊33D及第二門區塊53D分別位於區域34及區域54。從圖4及圖6可見,由於區域54為門外影像而區域34、區域35及區域55皆為門內影像,因此區域54中的每一第二門區塊對應的實時門特徵不相符於區域34中的每一第一門區塊對應的關門特徵(於後將此些第二門區塊稱為不符第二門區塊)。例如,第二門區塊53D的實時門特徵不相符於第一門區塊33D的關門特徵。也就是說,因受門外的顏色、材質及輪廓的影響,導致第二門區塊53D的實時門特徵之值(例如,第二門顏色特徵、第二門輪廓特徵及第二門材質特徵之值)不同於第一門區塊33D的關門特徵之值(例如,第一門顏色特徵、第一門輪廓特徵及第一門材質特徵之值)。區域55內的每一第二門區塊對應的實時門特徵相符於區域35內的每一第一門區塊對應的關門特徵(於後將此些第二門區塊稱為相符第二門區塊)。例如,第二門區塊53A~53C的實時門特徵相符於第一門區塊33A~33C的關門特徵。也就是說,因未受門外的顏色、材質及輪廓的影響,第二門區塊53A~53C的實時門特徵之值(例如,第二門顏色特徵、第二門輪廓特徵及第二門材質特徵之值)是相同於第一門區塊33A~33C的關門特徵之值(例如,第一門顏色特徵、第一門輪廓特徵及第一門材質特徵之值)。The second door image 51 presents a half-open elevator door as an example for illustration. Area 34 and area 35 in FIG. 4 are both images inside the elevator door. The area 54 in FIG. 6 is the outside image of the elevator door, and the area 55 is the inside image of the elevator door. The first door blocks 33A- 33C correspond to the same positions as the second door blocks 53A- 53C respectively, and the first door blocks 33A- 33C and the second door blocks 53A- 53C are respectively located in the area 35 and the area 55 . The first door block 33D and the second door block 53D correspond to the same position, and the first door block 33D and the second door block 53D are respectively located in the area 34 and the area 54 . It can be seen from Fig. 4 and Fig. 6 that since area 54 is an image outside the door and area 34, area 35, and area 55 are all images inside the door, the real-time door feature corresponding to each second door block in area 54 does not match the area. Each of the first door blocks in 34 corresponds to the door closing feature (these second door blocks are referred to as inconsistent second door blocks hereinafter). For example, the real-time door feature of the second door block 53D does not match the door-close feature of the first door block 33D. That is to say, due to the influence of the color, material and outline of the door, the real-time door feature values of the second door block 53D (for example, the value of the second door color feature, the second door outline feature and the second door material feature) value) is different from the value of the door closing feature of the first door block 33D (for example, the values of the first door color feature, the first door outline feature and the first door material feature). The real-time door feature corresponding to each second door block in the area 55 is consistent with the closing door feature corresponding to each first door block in the area 35 (hereinafter these second door blocks are referred to as matching second doors block). For example, the real-time door features of the second door blocks 53A-53C are consistent with the door-closing features of the first door blocks 33A-33C. That is to say, the real-time door feature values (for example, the second door color feature, the second door outline feature, and the second door material feature) of the second door blocks 53A-53C are not affected by the color, material, and outline of the door. The value of the feature) is the same as the value of the door closing feature of the first door blocks 33A-33C (for example, the values of the first door color feature, the first door outline feature and the first door material feature).
不符第二門區塊所形成的區域54表示電梯門所開啟的門縫大小,即區域54是門縫面積。因此,處理器13透過相加每一不符第二門區塊的像素大小即可獲得門縫面積。當門縫面積小於一門縫閾值時,表示電梯門為半關或是關閉(即電梯門所開啟的門縫較小或是完全關閉),則處理器13判斷電梯處於半關狀態或是關閉狀態。當門縫面積不小於門縫閾值時,表示電梯門為全開(即電梯門所開啟的門縫較大或是完全開啟),則處理器13判斷電梯處於全開狀態。其中,門縫閾值可以被預先儲存於儲存裝置11中。The area 54 formed by the inconsistent second door block indicates the size of the door gap opened by the elevator door, that is, the area 54 is the area of the door gap. Therefore, the processor 13 can obtain the door gap area by summing up the pixel sizes of each inconsistent second door block. When the area of the door gap is less than a door gap threshold, it means that the elevator door is half closed or closed (that is, the door gap opened by the elevator door is small or completely closed), and the processor 13 judges that the elevator is in a half closed state or a closed state . When the area of the door gap is not less than the threshold value of the door gap, it means that the elevator door is fully open (that is, the elevator door is opened with a large gap or fully opened), and the processor 13 judges that the elevator is in a fully open state. Wherein, the door gap threshold may be pre-stored in the storage device 11 .
在一些實施例中,處理器13依據第二門影像51的像素大小而獲得一門總面積。例如,處理器13將第二門影像51的每一像素的大小進行相加而獲得門總面積。處理器13透過相加每一相符第二門區塊的像素大小而可以獲得剩餘門面積(例如,如圖6所示的區域55)。門縫面積可以是處理器13將門總面積減去剩餘門面積而計算得。在一些實施例中,處理器13依據門縫面積及門總面積而獲得一門狀態值。例如,處理器13將門縫面積除以門總面積而計算得門狀態值。當門狀態值小於門狀態閾值時(例如,門狀態閾值小於0.8時表示電梯門為半關或是關閉),則處理器13判斷電梯處於半關狀態或是關閉狀態。當門狀態值不小於門狀態閾值時(例如,門狀態閾值不小於0.8時表示電梯門為全開),則處理器13判斷電梯處於全開狀態。門狀態閾值可以被預先儲存於儲存裝置11中。In some embodiments, the processor 13 obtains a total door area according to the pixel size of the second door image 51 . For example, the processor 13 adds the size of each pixel of the second door image 51 to obtain the total area of the door. The processor 13 can obtain the remaining gate area (for example, the area 55 shown in FIG. 6 ) by summing the pixel size of each corresponding second gate block. The door gap area can be calculated by the processor 13 by subtracting the remaining door area from the total door area. In some embodiments, the processor 13 obtains a door state value according to the door gap area and the total door area. For example, the processor 13 divides the door gap area by the total door area to calculate the door state value. When the door state value is less than the door state threshold (for example, when the door state threshold is less than 0.8, it means that the elevator door is half-closed or closed), the processor 13 determines that the elevator is in a half-closed state or closed state. When the door state value is not less than the door state threshold (for example, when the door state threshold is not less than 0.8, it means that the elevator door is fully open), the processor 13 judges that the elevator is in the fully open state. The door state threshold can be pre-stored in the storage device 11 .
參照圖7,係為本發明依據一些實施例之第二門影像51的示意圖。在一些實施例中,處理器13決定第二門影像51的一站人區A1。由於電梯門前可能站立有乘客而阻擋了部分電梯門所呈現的影像,因此為了避免在電梯門前站立有乘客時影響到電梯之電梯門的開關狀態的判斷(例如避免步驟S205的判斷受到影響),處理器13可以基於站人區A1之外的區域(於後稱為剩餘區域A2)來執行步驟S205之相關動作。也就是說,可以是排除位於站人區A1中的第二門區塊而僅對位於剩餘區域A2的第二門區塊及其對應的第一門區塊進行步驟S205。Referring to FIG. 7 , it is a schematic diagram of a second door image 51 according to some embodiments of the present invention. In some embodiments, the processor 13 determines the one-stop pedestrian area A1 of the second door image 51 . Because there may be passengers standing in front of the elevator door and blocking the image presented by part of the elevator door, in order to avoid affecting the judgment of the switch state of the elevator door when there are passengers standing in front of the elevator door (for example, to avoid the judgment of step S205 being affected), The processor 13 may perform the related actions of step S205 based on the area outside the standing area A1 (referred to as the remaining area A2 hereinafter). That is to say, step S205 may be performed only on the second door block located in the remaining area A2 and its corresponding first door block by excluding the second door block located in the pedestrian area A1 .
如圖7所示,在一些實施例中,站人區A1是第二門影像51的一影像底部邊緣L1向內位移一距離所界定的一站人邊緣L2和影像底部邊緣L1之間的區域。影像底部邊緣L1可以對應地板。例如,影像底部邊緣L1從地板往電梯頂部(例如電梯的出口板)的方向(例如方向D1,即第二門影像51之由下至上的方向)位移一距離以界定站人邊緣L2。在一些實施例中,影像底部邊緣L1向內位移的距離可以根據乘客的高度來設定。在一些實施例中,處理器13沿著第一維度(例如方向D2,即第二門影像51之由左至右的方向)依序執行獲得站人標示區塊的步驟。獲得站人標示區塊的步驟可以是,處理器13沿著第二維度(例如方向D1),判斷第一門區塊所對應的關門特徵是否相符於第二門區塊所對應的實時門特徵,並將第二門影像51中沿著第二維度所判斷的第一個相符第二門區塊作為站人標示區塊。處理器13將在第一維度上依序獲得的每一站人標示區塊串連而形成出站人邊緣L2。在一些實施例中,在站人區A1中,同一位置下的每一第二門區塊所對應的實時門特徵不相符於每一第一門區塊所對應的關門特徵。例如,如圖4及圖7所示,第二門區塊53A~53C位於站人區A1中。由於在站人區A1中電梯門被乘客阻擋,因此第一門區塊33A~33C的實時門特徵不相符於第二門區塊53A~53C的關門特徵。As shown in FIG. 7 , in some embodiments, the standing area A1 is an area between a standing human edge L2 and the bottom edge L1 of the image defined by an inward displacement of a distance from the bottom edge L1 of the second door image 51 . The bottom edge L1 of the image may correspond to the floor. For example, the bottom edge L1 of the image is displaced a distance from the floor toward the top of the elevator (eg, the exit panel of the elevator) (eg, the direction D1, ie, the bottom-to-top direction of the second door image 51 ) to define the standing edge L2. In some embodiments, the inward displacement distance of the bottom edge L1 of the image can be set according to the height of the passenger. In some embodiments, the processor 13 sequentially executes the step of obtaining the standing and occupant marking block along the first dimension (for example, the direction D2 , ie, the direction from left to right of the second door image 51 ). The step of obtaining the marked block of standing people may be that the processor 13 determines whether the door closing feature corresponding to the first door block matches the real-time door feature corresponding to the second door block along the second dimension (for example, direction D1). , and the first matching second door block judged along the second dimension in the second door image 51 is used as the standing person marking block. The processor 13 concatenates each stop person marking block sequentially obtained on the first dimension to form the outbound person edge L2. In some embodiments, in the station area A1, the real-time door feature corresponding to each second door block at the same position does not match the door closing feature corresponding to each first door block. For example, as shown in FIG. 4 and FIG. 7 , the second door blocks 53A-53C are located in the station area A1. Since the elevator doors are blocked by passengers in the station A1, the real-time door features of the first door blocks 33A-33C do not match the door-closing features of the second door blocks 53A-53C.
在一些實施例中,門縫面積的計算是對在第二門影像51中位於站人區A1之外(即剩餘區域A2)的每一不符的實時門特徵所對應的第二門區塊(即不符第二門區塊,例如圖7所示的剩餘區域A2中的門外區域541中的第二門區塊53E)的像素大小執行。例如,處理器13是將剩餘區域A2中的每一不符第二門區塊的像素大小進行相加以計算得門縫面積(例如門外區域541)。在一些實施例中,門總面積是依據在第二門影像51中位於站人區A1之外(即剩餘區域A2)的每一第二門區塊的像素大小而計算得。例如,處理器13是將剩餘區域A2中的每一第二門區塊的像素大小進行相加以計算得門總面積。處理器13可以是相加剩餘區域A2中每一相符的實時門特徵所對應的第二門區塊(即相符第二門區塊,例如如圖7所示的剩餘區域A2中的門內區域551中的第二門區塊53F)的像素大小而計算得剩餘門面積(例如門內區域551),並將門總面積減去剩餘門面積而計算得門縫面積。In some embodiments, the calculation of the door gap area is based on the second door block ( That is, it does not conform to the pixel size of the second gate block, such as the second gate block 53E in the outer gate area 541 in the remaining area A2 shown in FIG. 7 ). For example, the processor 13 calculates the door gap area (for example, the door outside area 541 ) by summing up the pixel sizes of each of the non-matching second door blocks in the remaining area A2 . In some embodiments, the total door area is calculated according to the pixel size of each second door block located outside the pedestrian area A1 (ie the remaining area A2 ) in the second door image 51 . For example, the processor 13 calculates the total gate area by summing the pixel size of each second gate block in the remaining area A2. The processor 13 may be to add the second gate block corresponding to each matching real-time door feature in the remaining area A2 (that is, the second gate block that matches the second gate block, for example, the door area in the remaining area A2 as shown in FIG. 7 The remaining door area (such as the door inner area 551 ) is calculated based on the pixel size of the second door block 53F in 551 , and the door gap area is calculated by subtracting the remaining door area from the total door area.
在一些實施例中,儲存裝置11儲存有車廂容積參數。車廂容積參數包含電梯的容留人數上限及場域參數。容留人數上限為在電梯的安全規範內,電梯一次性所能容納的最大人數。場域參數為電梯內的裝飾品於地板所對應到的面積。例如,當地板的一區域之上方設置有裝飾品時,可能造成該區域無法供乘客站立,因此該區域之面積可以被定義為場域參數。在步驟S211的一些實施例中,處理器13是依據該些空地板特徵、該些實時地板特徵及車廂容積參數獲得剩餘容留人數。也就是說,處理器13除了考量該些空地板特徵及該些實時地板特徵之外,還進一步考量車廂容積參數。如此,可以確保剩餘容留人數是準確的,例如剩餘容留人數是在確保電梯內的乘客皆可成功進入且成功站立的情形下,電梯剩餘可供乘客搭乘的人數。In some embodiments, the storage device 11 stores the compartment volume parameters. The car volume parameters include the upper limit of the elevator capacity and field parameters. The upper limit of the number of people allowed is the maximum number of people that the elevator can accommodate at one time within the safety specifications of the elevator. The field parameter is the area corresponding to the decorations in the elevator and the floor. For example, when decorations are placed on an area of the floor, the area may not be available for passengers to stand on, so the area of the area may be defined as a field parameter. In some embodiments of step S211, the processor 13 obtains the remaining number of occupants according to the empty floor features, the real-time floor features and the car volume parameters. That is to say, in addition to considering the empty floor features and the real-time floor features, the processor 13 further considers the compartment volume parameters. In this way, it is possible to ensure that the remaining number of people is accurate. For example, the remaining number of people is the number of passengers remaining in the elevator under the condition that all passengers in the elevator can successfully enter and stand successfully.
參照圖3及圖8。圖8係為本發明依據一些實施例之第一地板影像81的示意圖。在步驟S207的一些實施例中,處理器13依據地板座標,從關門空車廂影像30中擷取出有關地板的地板影像(於後稱為第一地板影像81)。處理器13將第一地板影像81區分為多個第一地板區塊83A~83D。為了方便說明,圖8僅繪製四個第一地板區塊,但本發明並不以此為限。在一些實施例中,處理器13將第一地板影像81以多個邊界區分為分別包含多個像素的多個第一地板區塊83A~83D。每一第一地板區塊83A~83D所包含的像素數量可為一致的,且每一第一地板區塊83A~83D定義在第一地板影像81中的不同的位置並且互相不重疊。換言之,相鄰的複數個像素組合成為一個第一地板區塊。在一些實施例中,每一第一地板區塊83A~83D包含由複數個像素組成的一像素矩陣(例如3*3的像素矩陣,亦即9個像素組合成的像素矩陣)。Refer to FIG. 3 and FIG. 8 . FIG. 8 is a schematic diagram of a first floor image 81 according to some embodiments of the present invention. In some embodiments of step S207 , the processor 13 retrieves a floor image (hereinafter referred to as the first floor image 81 ) related to the floor from the closed door and empty compartment image 30 according to the floor coordinates. The processor 13 divides the first floor image 81 into a plurality of first floor blocks 83A˜83D. For convenience of illustration, only four first floor blocks are drawn in FIG. 8 , but the present invention is not limited thereto. In some embodiments, the processor 13 divides the first floor image 81 into a plurality of first floor blocks 83A˜ 83D respectively including a plurality of pixels by a plurality of boundaries. The number of pixels included in each of the first floor blocks 83A-83D may be consistent, and each of the first floor blocks 83A-83D is defined at a different position in the first floor image 81 and does not overlap with each other. In other words, a plurality of adjacent pixels are combined to form a first floor block. In some embodiments, each of the first floor blocks 83A- 83D includes a pixel matrix composed of a plurality of pixels (for example, a 3*3 pixel matrix, that is, a pixel matrix composed of 9 pixels).
接著,處理器13對每一第一地板區塊83A~83D執行地板特徵程序,以獲得分別對應該些第一地板區塊83A~83D之該些空地板特徵。在一些實施例中,地板特徵程序包含地板顏色程序、地板輪廓程序及地板材質程序。每一空地板特徵包含第一地板顏色特徵、第一地板輪廓特徵及第一地板材質特徵。其中,第一地板顏色特徵是關於對應的第一地板區塊在關門空車廂影像30中呈現的顏色,第一地板輪廓特徵是關於對應的第一地板區塊在關門空車廂影像30中呈現的輪廓,第一地板材質特徵是關於對應的第一地板區塊在關門空車廂影像30中呈現的材質。具體來說,透過對第一地板區塊83A~83D執行地板顏色程序,處理器13可以獲得第一地板顏色特徵;透過對第一地板區塊83A~83D執行地板輪廓程序,處理器13可以獲得第一地板輪廓特徵;及透過對第一地板區塊83A~83D執行地板材質程序,處理器13可以獲得第一地板材質特徵。Next, the processor 13 executes the floor feature program on each of the first floor blocks 83A-83D, so as to obtain the empty floor features respectively corresponding to the first floor blocks 83A-83D. In some embodiments, the floor feature programs include a floor color program, a floor profile program, and a floor material program. Each empty floor feature includes a first floor color feature, a first floor profile feature and a first floor material feature. Wherein, the first floor color feature is the color presented in the closed door empty car image 30 with respect to the corresponding first floor block, and the first floor contour feature is presented in the closed door empty car image 30 with respect to the corresponding first floor block The profile, first floor material feature is the material present in the closed door empty car image 30 with respect to the corresponding first floor segment. Specifically, by executing the floor color program on the first floor blocks 83A~83D, the processor 13 can obtain the first floor color feature; by executing the floor contour program on the first floor blocks 83A~83D, the processor 13 can obtain The first floor profile feature; and by executing the floor material program on the first floor blocks 83A-83D, the processor 13 can obtain the first floor material feature.
參照圖9及圖10。圖9係為本發明依據一些實施例之實時影像90的示意圖。圖10係為本發明依據一些實施例之第二地板影像91的示意圖。與步驟S207相似地,在步驟S209的一些實施例中,處理器13依據地板座標,從實時影像90中擷取出有關地板的地板影像(於後稱為第二地板影像91)。處理器13將第二地板影像91區分為多個第二地板區塊93A~93D。為了方便說明,圖10僅繪製四個第二地板區塊,但本發明並不以此為限。在一些實施例中,處理器13將第二地板影像91以多個邊界區分為分別包含多個像素的多個第二地板區塊93A~93D。每一第二地板區塊93A~93D所包含的像素數量可為一致的,且每一第二地板區塊93A~93D定義在第二地板影像91中的不同的位置並且互相不重疊。換言之,相鄰的複數個像素組合成為一個第二地板區塊。在一些實施例中,每一第二地板區塊93A~93D包含由複數個像素組成的一像素矩陣(例如3*3的像素矩陣,亦即9個像素組合成的像素矩陣)。在一些實施例中,如圖8及圖10所示,由於第一地板影像81及第二地板影像91之尺寸可以是相同的,且區分第一地板區塊83A~83D及第二地板區塊93A~93D的方式可以是相同的,因此第一地板區塊83A~83D在第一地板影像81中的位置是與第二地板區塊93A~93D在第二地板影像91中的位置相對應。Refer to FIG. 9 and FIG. 10 . FIG. 9 is a schematic diagram of a real-time image 90 according to some embodiments of the present invention. FIG. 10 is a schematic diagram of a second floor image 91 according to some embodiments of the present invention. Similar to step S207 , in some embodiments of step S209 , the processor 13 extracts a floor image (hereinafter referred to as a second floor image 91 ) related to the floor from the real-time image 90 according to the floor coordinates. The processor 13 divides the second floor image 91 into a plurality of second floor blocks 93A˜93D. For convenience of illustration, FIG. 10 only draws four second floor blocks, but the present invention is not limited thereto. In some embodiments, the processor 13 divides the second floor image 91 into a plurality of second floor blocks 93A˜ 93D respectively including a plurality of pixels by a plurality of boundaries. The number of pixels included in each of the second floor blocks 93A-93D may be consistent, and each of the second floor blocks 93A-93D is defined at a different position in the second floor image 91 and does not overlap with each other. In other words, a plurality of adjacent pixels are combined to form a second floor block. In some embodiments, each of the second floor blocks 93A˜ 93D includes a pixel matrix composed of a plurality of pixels (for example, a 3*3 pixel matrix, that is, a pixel matrix composed of 9 pixels). In some embodiments, as shown in FIG. 8 and FIG. 10 , since the size of the first floor image 81 and the second floor image 91 can be the same, and distinguish the first floor blocks 83A~83D from the second floor blocks The manners of 93A-93D may be the same, so the positions of the first floor blocks 83A-83D in the first floor image 81 correspond to the positions of the second floor blocks 93A-93D in the second floor image 91 .
接著,處理器13對每一第二地板區塊93A~93D執行地板特徵程序,以獲得分別對應該些第二地板區塊93A~93D之該些實時地板特徵。在一些實施例中,每一實時地板特徵包含第二地板顏色特徵、第二地板輪廓特徵及第二地板材質特徵。其中,第二地板顏色特徵是關於對應的第二地板區塊在實時影像90中呈現的顏色,第二地板輪廓特徵是關於對應的第二地板區塊在實時影像90中呈現的輪廓,第二地板材質特徵是關於對應的第二地板區塊在實時影像90中呈現的材質。具體來說,透過對第二地板區塊93A~93D執行地板顏色程序,處理器13可以獲得第二地板顏色特徵;透過對第二地板區塊93A~93D執行地板輪廓程序,處理器13可以獲得第二地板輪廓特徵;及透過對第二地板區塊93A~93D執行地板材質程序,處理器13可以獲得第二地板材質特徵。Next, the processor 13 executes the floor feature program on each of the second floor blocks 93A-93D, so as to obtain the real-time floor features respectively corresponding to the second floor blocks 93A-93D. In some embodiments, each real-time floor feature includes a second floor color feature, a second floor profile feature, and a second floor material feature. Wherein, the second floor color feature is the color presented in the real-time image 90 with respect to the corresponding second floor block, the second floor outline feature is the contour presented in the real-time image 90 with respect to the corresponding second floor block, and the second The floor material feature is the material presented in the real-time image 90 with respect to the corresponding second floor segment. Specifically, by executing the floor color program on the second floor blocks 93A~93D, the processor 13 can obtain the second floor color feature; by executing the floor contour program on the second floor blocks 93A~93D, the processor 13 can obtain The second floor profile feature; and by executing the floor material program on the second floor blocks 93A-93D, the processor 13 can obtain the second floor material feature.
與門顏色程序相似地,前述地板顏色程序可以是處理器13計算每一第一地板區塊83A~83D的亮度平均值以作為每一第一地板顏色特徵,並計算每一第二地板區塊93A~93D的亮度平均值以作為每一第二地板顏色特徵。每一第一地板區塊83A~83D的亮度平均值可以是將每一第一地板區塊83A~83D內的像素之RGB值平均而得。每一第二地板區塊93A~93D的亮度平均值可以是將每一第二地板區塊93A~93D內的像素之RGB值平均而得。在一些實施例中,當關門空車廂影像30及實時影像50經過模糊處理之後,可以使單一第一地板區塊83A~83D及單一第二地板區塊93A~93D並不會受其內之像素之不同的RGB值影響而有大幅的變化。Similar to the door color program, the aforementioned floor color program can be that the processor 13 calculates the average brightness of each first floor block 83A~83D as the feature of each first floor color, and calculates the brightness value of each second floor block The brightness average value of 93A~93D is used as the characteristic of each second floor color. The average brightness of each first floor block 83A-83D can be obtained by averaging the RGB values of the pixels in each first floor block 83A-83D. The average brightness of each second floor block 93A-93D can be obtained by averaging the RGB values of the pixels in each second floor block 93A-93D. In some embodiments, after the image 30 of the closed and empty car and the real-time image 50 are blurred, the single first floor blocks 83A~83D and the single second floor blocks 93A~93D will not be affected by the pixels therein. There are large changes due to the influence of different RGB values.
與門輪廓程序及門材質程序相似地,地板輪廓程序及地板材質程序可以由神經網路實現。例如,處理器13依據多個地板的樣本影像而決定出有關地板輪廓的第三判斷邏輯及有關地板材質的第四判斷邏輯。處理器13依據第三判斷邏輯、第一地板區塊83A~83D及第二地板區塊93A~93D,即可獲得第一地板輪廓特徵及第二地板輪廓特徵。處理器13依據第四判斷邏輯、第一地板區塊83A~83D及第二地板區塊93A~93D,即可獲得第一地板材質特徵及第二地板材質特徵。Similar to the door profile program and the door material program, the floor profile program and the floor material program can be implemented by a neural network. For example, the processor 13 determines the third judgment logic related to the floor outline and the fourth judgment logic related to the floor material according to a plurality of sample images of the floor. The processor 13 can obtain the first floor contour feature and the second floor contour feature according to the third judgment logic, the first floor blocks 83A-83D and the second floor blocks 93A-93D. The processor 13 can obtain the first floor material feature and the second floor material feature according to the fourth judgment logic, the first floor blocks 83A-83D and the second floor blocks 93A-93D.
如圖8及圖10所示,在步驟S211的一些實施例中,處理器13依據該些第一地板區塊83A~83D於第一地板影像81的位置及該些第二地板區塊93A~93D於第二地板影像91的位置,比對在同一位置下的每一第一地板區塊83A~83D所對應的空地板特徵與每一第二地板區塊93A~93D所對應的實時地板特徵是否相符,將相符的每一實時地板特徵所對應的第二地板區塊的像素大小進行計算而產生一剩餘地板面積,並依據剩餘地板面積及車廂容積參數而獲得剩餘容留人數。As shown in FIG. 8 and FIG. 10 , in some embodiments of step S211, the processor 13 bases the positions of the first floor blocks 83A~83D on the first floor image 81 and the positions of the second floor blocks 93A~83D 93D at the position of the second floor image 91, comparing the empty floor features corresponding to each of the first floor blocks 83A~83D and the real-time floor features corresponding to each of the second floor blocks 93A~93D at the same position Whether it matches or not, the pixel size of the second floor block corresponding to each matching real-time floor feature is calculated to generate a remaining floor area, and the remaining number of people can be obtained according to the remaining floor area and the car volume parameters.
以第二地板影像91呈現有人影為例進行說明。如圖8所示,區域85為在第一地板影像81中,區域84之外的區域,且區域84及區域85皆不具有人影。如圖10所示,區域95為在第二地板影像91中,區域94之外的區域。區域94具有人影且區域95不具有人影。第一地板區塊83D與第二地板區塊93D對應同一位置,且第一地板區塊83D及第二地板區塊93D分別位於區域85及區域95。第一地板區塊83A~83C分別與第二地板區塊93A~93C對應同一位置,且第一地板區塊83A~83C及第二地板區塊93A~93C分別位於區域84及區域94。The second floor image 91 presents a human figure as an example for illustration. As shown in FIG. 8 , the area 85 is an area outside the area 84 in the first floor image 81 , and neither the area 84 nor the area 85 has human figures. As shown in FIG. 10 , the area 95 is an area outside the area 94 in the second floor image 91 . Area 94 has a human figure and area 95 has no human figure. The first floor block 83D and the second floor block 93D correspond to the same position, and the first floor block 83D and the second floor block 93D are respectively located in the area 85 and the area 95 . The first floor blocks 83A-83C respectively correspond to the same positions as the second floor blocks 93A-93C, and the first floor blocks 83A-83C and the second floor blocks 93A-93C are located in the area 84 and the area 94 respectively.
從圖8及圖10可見,由於區域94具有人影而區域84、區域85及區域95皆不具有人影,因此區域94中的每一第二地板區塊對應的實時地板特徵不相符於區域84中的每一第一地板區塊對應的空地板特徵(於後將此些第二地板區塊稱為不符第二地板區塊)。例如,第二地板區塊93A~93C的實時地板特徵不相符於第一地板區塊83A~83C的空地板特徵。也就是說,因受人影的顏色、材質及輪廓的影響,導致第二地板區塊93A~93C的實時地板特徵之值(例如,第二地板顏色特徵、第二地板輪廓特徵及第二地板材質特徵之值)不同於第一地板區塊83A~83C的空地板特徵之值(例如,第一地板顏色特徵、第一地板輪廓特徵及第一地板材質特徵之值)。區域95內的每一第二地板區塊對應的實時地板特徵相符於區域85內的每一第一地板區塊對應的空地板特徵(於後將此些第二地板區塊稱為相符第二地板區塊)。例如,第二地板區塊93D的實時地板特徵相符於第一地板區塊83D的空地板特徵。也就是說,因未受人影的顏色、材質及輪廓的影響,第二地板區塊93D的實時地板特徵之值(例如,第二地板顏色特徵、第二地板輪廓特徵及第二地板材質特徵之值)是相同於第一地板區塊83D的空地板特徵之值(例如,第一地板顏色特徵、第一地板輪廓特徵及第一地板材質特徵之值)。相符第二地板區塊所形成的區域95表示地板未站人的面積,即區域95是剩餘地板面積。因此,處理器13透過相加每一相符第二地板區塊的像素大小即可獲得剩餘地板面積。接著,處理器13可以將剩餘地板面積乘以車廂容積參數以計算得剩餘容留人數。It can be seen from FIG. 8 and FIG. 10 that since the area 94 has human figures and the areas 84, 85 and 95 do not have human figures, the real-time floor features corresponding to each second floor block in the area 94 do not match those in the area 84. The empty floor features corresponding to each of the first floor blocks (these second floor blocks are referred to as inconsistent second floor blocks hereinafter). For example, the real-time floor features of the second floor blocks 93A-93C do not match the empty floor features of the first floor blocks 83A-83C. That is to say, due to the influence of the color, material and outline of the silhouette, the values of the real-time floor features of the second floor blocks 93A-93C (for example, the second floor color feature, the second floor outline feature and the second floor material The value of the characteristic) is different from the value of the empty floor characteristic of the first floor blocks 83A-83C (eg, the values of the first floor color characteristic, the first floor contour characteristic and the first floor material characteristic). The real-time floor features corresponding to each second floor block in the area 95 are consistent with the empty floor features corresponding to each first floor block in the area 85 (these second floor blocks are referred to as matching second floor blocks hereinafter). floor block). For example, the real-time floor characteristics of the second floor block 93D match the empty floor characteristics of the first floor block 83D. That is to say, because it is not affected by the color, material and outline of the human figure, the real-time floor feature values of the second floor block 93D (for example, values of the second floor color feature, the second floor outline feature, and the second floor material feature) value) is the same as the value of the empty floor characteristic of the first floor block 83D (eg, the values of the first floor color characteristic, the first floor outline characteristic and the first floor material characteristic). The area 95 formed by matching the second floor block represents the area of the floor where no people stand on it, that is, the area 95 is the remaining floor area. Therefore, the processor 13 can obtain the remaining floor area by summing up the pixel size of each matching second floor block. Next, the processor 13 may multiply the remaining floor area by the compartment volume parameter to calculate the remaining number of people.
在一些實施例中,處理器13依據第二地板影像91的像素大小而獲得一地板總面積。例如,處理器13將第二地板門影像的每一像素的大小進行相加而獲得地板總面積。處理器13透過相加每一不符第二地板區塊的像素大小而可以獲得站人面積(例如,如圖10所示的區域94)。剩餘地板面積可以是處理器13將地板總面積減去站人面積而計算得。In some embodiments, the processor 13 obtains a total floor area according to the pixel size of the second floor image 91 . For example, the processor 13 adds the size of each pixel of the second floor door image to obtain the total floor area. The processor 13 can obtain the standing area (for example, the area 94 shown in FIG. 10 ) by summing the pixel size of each inconsistent second floor block. The remaining floor area can be calculated by the processor 13 by subtracting the standing area from the total floor area.
如圖9所示,在步驟S211的一些實施例中,處理器13決定第二地板影像91的一重點地板區941,並產生對應重點地板區941的一區域權重。重點地板區941可以是乘客較不想於地板站立的位置。換言之,當電梯內的乘客較多時,重點地板區941較容易被乘客站立到。例如,重點地板區941是第二地板影像91的至少一角落及/或第二地板影像91中接近實時影像90的第二門影像51的區域。區域權重可以是人數下降參數,以降低剩餘地板面積之值。例如,人數下降參數可以為一小數值。處理器13比對對應於重點地板區941的實時地板特徵及空地板特徵。當在重點地板區941中,同一位置下的每一第二地板區塊所對應的實時地板特徵不相符於每一第二地板區塊所對應的空地板特徵時,表示重點地板區941已站立有乘客,處理器13將區域權重與剩餘地板面積結合而產生一剩餘地板加權面積,並依據剩餘地板加權面積及車廂容積參數而獲得剩餘容留人數。換言之,處理器13除了考量剩餘地板面積及車廂容積參數之外,還進一步考量區域權重。由於當重點地板區941站立有乘客時,表示電梯內可能已載有大量的乘客,因此透過一併考量剩餘地板面積、車廂容積參數及區域權重,可以確保在需要滿載模式時滿載模式能被觸發。在一些實施例中,處理器13可以是將區域權重乘以剩餘地板面積而計算得剩餘地板加權面積,並將剩餘地板加權面積乘以車廂容積參數而計算得剩餘容留人數。As shown in FIG. 9 , in some embodiments of step S211 , the processor 13 determines an important floor area 941 of the second floor image 91 and generates an area weight corresponding to the important floor area 941 . The critical floor area 941 may be a location where passengers are less inclined to stand on the floor. In other words, when there are many passengers in the elevator, the key floor area 941 is easier for passengers to stand on. For example, the key floor area 941 is at least a corner of the second floor image 91 and/or an area in the second floor image 91 close to the second door image 51 of the real-time image 90 . The area weight can be a headcount drop parameter to reduce the value of the remaining floor area. For example, the headcount drop parameter can be a small value. The processor 13 compares the real-time floor features and empty floor features corresponding to the important floor area 941 . When in the key floor area 941, the real-time floor feature corresponding to each second floor block under the same position does not match the empty floor feature corresponding to each second floor block, it means that the key floor area 941 has stood If there are passengers, the processor 13 combines the area weight with the remaining floor area to generate a remaining floor weighted area, and obtains the remaining number of people according to the remaining floor weighted area and the compartment volume parameters. In other words, the processor 13 further considers the area weights in addition to the parameters of the remaining floor area and the compartment volume. Since there are passengers standing in the key floor area 941, it means that there may be a large number of passengers in the elevator, so by considering the remaining floor area, the car volume parameters and the area weight together, it can be ensured that the full load mode can be triggered when the full load mode is required . In some embodiments, the processor 13 may calculate the remaining floor weighted area by multiplying the area weight by the remaining floor area, and multiply the remaining floor weighted area by the compartment volume parameter to calculate the remaining number of occupants.
在一些實施例中,在判斷電梯是否處於半關狀態或是關門狀態(步驟S205)之前,處理器13判斷關門空車廂影像30及實時影像50、90之間的一差異程度是否達到一異常閾值。異常閾值可以被儲存於儲存裝置11。在差異程度未達到異常閾值時,處理器13執行步驟S205及其接續步驟。在差異程度達到異常閾值時,表示實時影像50、90有異常發生(例如,實時影像因電梯內的光源不穩定導致成像結果不佳),則處理器13控制攝影裝置15重新拍攝新的實時影像,返回執行步驟S203以獲得新的實時影像50、90之實時門特徵,並接續後續的步驟。如此,避免後續的步驟(例如步驟S205~S215)受到異常狀態下的實時影像的影響。在一些實施例中,差異程度可以是關門空車廂影像中第一門影像31及第一地板影像81之外的影像區域與實時影像中第二門影像51及第二地板影像91之外的影像區域之間的顏色差異程度、輪廓差異程度、及/或材質差異程度。In some embodiments, before judging whether the elevator is in a half-closed state or a door-closed state (step S205), the processor 13 judges whether a degree of difference between the door-closed and empty car image 30 and the real-time images 50, 90 reaches an abnormal threshold . The abnormal threshold can be stored in the storage device 11 . When the degree of difference does not reach the abnormal threshold, the processor 13 executes step S205 and its subsequent steps. When the degree of difference reaches the abnormal threshold value, it means that the real-time images 50 and 90 have abnormalities (for example, the real-time images have poor imaging results due to the unstable light source in the elevator), and the processor 13 controls the photographing device 15 to take new real-time images again. , return to step S203 to obtain the real-time gate features of the new real-time images 50, 90, and continue with the subsequent steps. In this way, subsequent steps (such as steps S205 - S215 ) are prevented from being affected by real-time images in abnormal states. In some embodiments, the degree of difference may be the image area outside the first door image 31 and the first floor image 81 in the closed door and empty compartment image and the image outside the second door image 51 and the second floor image 91 in the real-time image The degree of color difference, the degree of contour difference, and/or the degree of material difference between regions.
綜上所述,依據一些實施例,本發明可以透過影像辨識技術,來判斷是否觸發電梯的滿載模式。如此,即可確保在電梯內具有大量的乘客時,電梯的滿載模式能被觸發及啟動。To sum up, according to some embodiments, the present invention can determine whether to trigger the full-load mode of the elevator through the image recognition technology. In this way, it can be ensured that when there are a large number of passengers in the elevator, the full-load mode of the elevator can be triggered and started.