A HV-PCI6 VIDEODIGITALIZÁLÓ KÁRTYA ÉS ALKALMAZÁSAI (HV-PCI6 Video Digitizing Card and its Applications) Ladányi Zoltán, Ladányi Péter, Máthé József, Nagy Ferenc, Nagy Tamás, Patkó Tamás Hexium Műszaki Fejlesztő Kft. 1134 Budapest, Váci út 51/b Email:
[email protected] Tel.: (+36 1) 320-8338, Fax.: (+36 1) 340-8072
Abstract In this article the possible fields of applications for the HV-PCI6 video-digitizing card are summarized, its hardware structure and its software interface is described. Among the applications of HV-PCI6, the VIDOC survaillance and image transmission system which has spread widely in security techniques is described in detail.
Összefoglaló Cikkünkben röviden áttekintjük a HVPCI6 videodigitalizáló kártya lehetséges felhasználási területeit, ismertetjük hardveres felépítését, valamint bemutatjuk szoftveres kezelését. A HV-PCI6-hoz kapcsolódó alkalmazások közül részletesen bemutatjuk a biztonságtechnikában elterjedt VIDOC biztonságtechnikai videomegfigyelő és képátviteli rendszert.
Bevezetés A HV-PCI6 videodigitalizáló kártyacsaládot cégünk 1997-ben fejlesztette ki. Az elmúlt évben itthon több mint 300db-ot adtunk el, de már határainkon kívül is több mint 50db kártyánk működik (Angliában, Németországban, Törökországban, USA-ban, Japánban, Thaiföldön). Termékünk utóéletét megvizsgálva egyértelműen megállapítható, hogy partnereink szinte kivétel nélkül olyan fejlesztők voltak, akik saját rendszerükhöz kerestek (és találtak) megbízható, komoly terméktámogatással rendelkező (DOS-DPMI32-től Windows NT-ig) videodigitalizáló eszközt. Az elmúlt két évben a felhasználói igényeknek eleget téve megjelentek a HV-PCI6 család többi tagjai is: a felhasználói program szerzői jogi védelmét szolgáló hardverkulcsos és 24 órás működését szavatoló watch-dogos verziók mellett kimeneti encoderrel ellátott, valamint RGB videojel fogadására alkalmas változatokkal is állunk partnereink rendelkezésére. A HV-PCI6 eszközök felhasználási területe igen széles. A biztonságtechnikai alkalmazások közül videomegfigyelő és képtovábbító-, rendszámazonosító-, gépjármű eredetiségvizsgáló, biometrikus azonosító rendszerekről, az ipari alkalmazások közül minőségbiztosítási-, méréstechnikai és automatizálási alkalmazásokról, a tudományos kutatás területén orvosbiológiai, fémfizikai, holografikus interferometriai, robotikai kutatások területén történő felhasználásról tudunk beszámolni. Természetesen a fenti területek szinte mindegyikének oktatásában is szerepet kap a HV-PCI6 kártyacsalád a hazai főiskolákon, egyetemeken: BME, BMF (volt KKMF), Veszprémi Egyetem, Miskolci Egyetem, SOTE, stb. Az elmúlt év végén PC/104plus szabványú családtaggal bővült digitalizáló eszközkínálatunk. Ebben az évben további változatok kifejlesztésével készülünk el, a II. negyedévben megjelenik az eddigieknél gyorsabb kameraváltást elősegítő, ill. a III. negyedévben egy az eddigieknél hatékonyabb képtömörítést és más képfeldolgozási eljárásokat is tartalmazó kártya. Széleskörben nagy érdeklődésre tarthat számot a PC-s felület nélkül, önállóan működő és alap képfeldolgozási műveletek elvégzésére alkalmas eszközünk, a VideoCompact.
A HV-PCI6 video-digitalizáló kártyacsalád típusai és azok felépítése Általános ismertető A HV-PCI6 video-digitalizáló (framegrabber) kártya 6 darab kompozit videojel (CVBS) vagy 3 darab világosság- (Y) és színjel (C) páros fogadására képes. A kártya a PAL, SECAM és az NTSC szabványnak megfelelő videojeleket is feldolgozza. Az aktuális bemenet szoftver segítségével kerül kiválasztásra. A digitalizálás sebessége maximálisan 25 teljes kép másodpercenként, míg a legjobb felbontás 768*576 (NTSC jel esetén 30 kép és 640*480). A kártya három féle üzemmódban dolgozhat.
Az egyikben csak szürke árnyalatokat (fekete-fehér) tartalmaz a digitalizált kép (8 bit grayscale üzemmód), ami képpontonként 8 bitet jelent. A másikban színkülönbségi jelek tartalmazzák a színinformációt, illetve egy világosságjel a világosságinformációt (16 bit YUV üzemmód). A harmadikban három 8 bites színösszetevőt használunk képpontonként (24 bit RGB üzemmód). Lehetőség van egy ellenőrző monitor csatlakoztatására amelyen nyomon követhető az aktuális csatornára kapcsolt videojel.
EEPROM
HEXIUM proGuard hardware key
Video in
Video decoder
PCI interface BUS Master
Video encoder
Video out
PCI bus
1. ábra: A HV-PCI6 blokkvázlata A legfontosabb meghajtó programokat kártyánkhoz mellékeljük, amelynek segítségével a kártyánk a legismertebb operációs rendszerekből kereskedelmi programok segítségével kezelhető. Fontosabb driverek: Windows NT-hez Windows 95-höz Twain32-hez (Win95 és WinNT alatt) Video for Windows (WinNT alatt) DOS-DPMI32
Kártyatípusok Jelenleg a video-digitalizáló kártyacsalád alábbi tagjai állnak rendelkezésre:
HV-PCI6/S
STANDARD
HV-PCI6/N
NORMAL
HV-PCI6/I
INDUSTRIAL
HV-PCI6/E HV-PCI6/X
ENCODER
NEBULUS
PROFESSIONAL
1 db SVHS csatlakozó + 3 BNC az alaplapon D25-ön keresztül minden bemenet és a TESZT analóg kimenet elérhető 4 db BNC csatlakozó az alaplapon D25-ön keresztül minden bemenet és a TESZT analóg kimenet elérhető A kártyán telepített WATCH-DOG, HARDVER-KULCS funkció A kártyán telepített video-encoder IC (SAA7187) A digitalizálókártyához csatlakoztatható bővítőmodul RGB jelek fogadására alkalmas
Hardveres konfigurálás A kártyán elhelyezett digitalizáló IC-nek hat jelbemenete van (AIN 21,22,31,32,41,42). Ezek a jelbemenetek használhatók egyenként vagy párosával attól függően hogy kompozit videojelekkel (CVBS), vagy külön világosság- (Y) és színjelekkel (C) dolgozunk. A kártya jelcsatlakozóinak és az IC be- illetve kimeneteinek összerendelése jumperek segítségével lehetséges. A kártyára szerelt csatlakozók kiépítése a kártya típusától függ. A BNC és SVHS csatlakozókon egyszerre nem férhető hozzá mindegyik IC jelbemenet illetve jelkimenet. A kártyán ezért található egy 26 pólusú (CON1 pozíciószámú) csatlakozó a bővítő kártya számára (HV-PCI6/X), amellyel minden jelbemenet és jelkimenet elérhető.
Szoftveres konfigurálás A kártya megfelel a PCI 2.1-es szabványnak. Az installáláshoz nem szükséges semmiféle jumper beállítása. A PCI busznak köszönhetően a rendszer erőforrások allokálása teljesen automatikus. A kártya meghajtóprogramjai nem használják ki a hardver által támogatott megszakításos működést, így az installáció során nem fordulnak elő az ismert -a megszakítások véges számából adódó- problémák.
A VIDOC biztonságtechnikai videomegfigyelő és képátviteli rendszer A HV-PCI6 kártyacsalád műszaki konstrukciója miatt jól használható a biztonságtecnika különböző területein is. Az általunk kifejlesztett és folyamatos fejlesztés alatt álló videomegfigyelő és képátviteli rendszerünket partnercégeink széles körben sikerrel telepítik, illetve alkalmazzák. A rendszer feladata, hogy a digitalizáló kártyára érkező videojeleket folyamatosan figyelje és valamilyen esemény (pl.: riasztás, beállítások megváltoztatása) esetén naplóbejegyzést, illetve képet rögzítsen. A naplóban illetve a képadatbázisban a felhasználó egy kényelmes és könnyen kezelhető felület segítségével kereshessen, több szempont szerinti (dátum/idő, kamera, stb.) szűréseket végezhessen. További feladat még, hogy a keletkező nagy mennyiségű adatot – a naplót illetve a tömörített képeket – a rendszer a háttérben valamilyen nagy kapacitású másodlagos tárolóra (DAT-ra) mentse, illetve TCP/IP protokollon, bármilyen hálózati csatornán (akár modemen) keresztül a felügyeletet ellátó egységnek továbbítsa. A rendszer Microsoft Windows NT 4.0 operációs rendszer alatt fut, 7/24-órás üzemmódban, melyet egy saját fejlesztésű keretprogram, a HexShell biztosít. Rendszerindulás után, a HexShell automatikusan belép az operációs rendszerbe, majd elindítja a Vidoc betöltő programját. A 24 órás működést úgy biztosítja, hogy több jogosultsági szinten, dinamikusan változó jelszóval védi az operációs rendszert a leállítástól, újraindítástól, átkonfigurálástól illetve programok elindításától. A Hexium Vidoc rendszernek három alaptípusa van, a Stand Alone (SA), a Master (MA) és a Slave (SL). A Stand Alone típus egy önálló rendszer, külső kapcsolata másik egységekkel nincs. A Master típus alapvetően adatgyűjtő és archiválási funkciókra használható, hozzá kapcsolódnak a kliensoldali Slave egységek, melyek a létrejövő adatokat folyamatosan a Master egységnek TCP/IP protokollon továbbítják. A rendszer részei (2. ábra): • a digitalizáló modul, mely a rendszerbe illesztett digitalizáló kártyák párhuzamos meghajtásával a bekötött videojelek folyamatos digitalizálását biztosítja, • a képtartalom alapú mozgás- és jelenlét-érzékelő modul, mely a kezelő által beállítható mozgásérzékeny felületek (kameránként 12db) alapján a mozgásérzékelést végzi, • a szintén saját fejlesztésű Multi I/O kátya, mely egyrészről a 16 bemenetén fogadja a külső riasztásokat, azaz a hagyományos érzékelők (passzív infra, ajtónyitás-érzékelő, stb.) jeleit, másrészről a 16 programozható kimenetén vagy a beépített relén szükség esetén jelzést ad, • az esemény feldolgozó modul, ami ha bármilyen riasztási eseményt érzékel, akkor a szükséges elvégzendő intézkedésekről (tárolás indítása, riasztás jelzése, forgózsámoly vezérlése) gondoskodik, • a forgózsámolyt (pan/tilt/zoom) kezelő modul, mely az egyik magyar partnercégünk (HFT Kft.) által készített és gyártott Cyber Eye egységgel való kommunikációt végzi, és a távoli vezérlését a felhasználó számára lehetővé teszi, • a naplózást végző modul, mely az eseményekhez tartozó naplóbejegyzéseket tárolja el, • a tömörítést végző modul, mely a tárolandó képet – az operációs rendszer többfeladatos lehetőségeit kihasználva – a háttérben tömöríti össze JPEG formátumba, majd menti el a képeket tartalmazó adatbázisba, • a hálózatot kezelő modul, mely küldi vagy fogadja és rögzíti a rendszer által eltárolt naplótételeket, képeket, • a napló és a kép adatbázisban lehetőség van az események visszajátszására, a kritikus képek exportálására, • az archiváló és visszakereső modul, mely az összegyűlt adatokat menti el illetve tölti vissza egy másodlagos, nagy kapacitású tárolóról, DAT-ról (ez a modul egyszerűsítési okokból nem szerepel az ábrán).
A digitalizálás jellemzői Egy Vidoc egységhez maximum 3 darab digitalizáló kártya illeszthető, így egy egység összesen 18 kamera jelének fogadására képes. A digitalizáló kártyákat a rendszer párhuzamosan kezeli, így csökkentve le a felesleges várakozási időt.
A kamerákról való digitalizálás kétféleképpen történhet. Az automatikus képkészítésnél a kezelő által beállítható sorrend alapján történik a digitalizálás, mely sorrend tartalmazza a kamera számát, a kép méretét, illetve videomódját. A kép mérete és a videomódja is három féle lehet. A kép mérete nagy (768x576), közepes (384x288), illetve kicsi (192x144), videomódja pedig 8 bites szürkeskálás, 16 bites YUV vagy 24 bites RGB lehet. A digitalizálás másik módja az ún. egyedi képkészítés, ami valamilyen speciális esetben kapcsolódik be, pl.: riasztás egy kamerán, vagy külső riasztási bemeneten. Ilyenkor az automatikus digitalizálási ciklust a rendszer rövid időre – beállítható számú egyedi kép készítéséig –felfüggeszti, hogy az egyedi képigényeket minél hamarabb kielégíthesse. A rendszer tesztelése során a legtöbb problémát a kameraváltás okozta. A kártyán lévő digitalizáló áramkör automatikus erősítést (AGC) végző része túl nagy időállandóval működik, így a nagy sebességgel változó videojelek hatására a jelet a korábbi kamerák jelétől függő erősítési értékkel változtatta. Az így keletkezett intenzitás-változás sajnos olykor hibát eredményezett a képfeldolgozó műveletek során. Az AGC kikapcsolásával a probléma megoldódott, sőt lehetőségünk nyílt a videojelek statikus erősítésére is. Erre igen gyakran szükség van, hiszen sok esetben a távolról érkező videojel a digitalizáló kártyához érve már igen gyenge, s más esetben a jel javításához különböző erősítő áramköröket kellene beépíteni. A kameraváltás igazi hátulütője a nem szinkronizált kamerák esetében volt. Mivel az egy kártyán lévő bemenetek multiplexeltek, a kameraváltáskor a videojelek szinkronját a helyes kép érdekében a digitalizáló áramkörnek érzékelnie kell. Sajnos ennek az áramkörnek az időállandója is igen nagy, így szinkronizálatlan kamerák váltásakor kb. 160ms-ot kell várnunk. Mindkét problémát enyhíti viszont a fejlesztés alatt lévő duál-dekóderrel rendelkező digitalizáló kártya használata.
A mozgásérzékelés [KÉPAF97-Hexium] A mozgás- és jelenlét-érzékelő modul részletes ismertetése az 1997-es KÉPAF konferencián megtörtént, így itt csak röviden összefoglaljuk. A képet négyzet alakú cellákra osztjuk, melyek mérete arányosan függ a digitalizált kép méretétől (pl.: 768x576 esetén 8x8, 384x288 esetén 4x4, stb.). A kifejlesztett eljárásban a mozgás- és jelenlét-érzékelés alapja a cella pontjaiból számolt cellaérték. Az érzékelés során a pillanatnyi cellaértékeket hasonlítjuk össze a memóriában tárolt referencia cellaértékekkel. Ha az eltérés egy 3. ábra: A mozgás- és jelenlét-érzékelés megvalósítása adott szintet elér, a mozgásérzékelő egység riaszt. A mozgásérzékelés és a jelenlétérzékelés csak az adaptálódásban különbözik. Mozgásérzékeléskor a referencia cellaértékek felveszik az aktuális cellák értékeit, míg jelenlét-érzékeléskor a referencia cellaértékek folyamatosan közelítenek az új cellaértékhez:
U =R+
N−R , T
ahol, N az új cellaérték, R a referencia cellaérték, T időállandó, a közelítés idejét határozza meg (mozgásérzékelés = 1, jelenlétérzékelés=10-től), U a közelítő függvény, értéke az új referencia cellaérték. A Hexium Vidoc rendszerekben ténylegesen használt mozgásérzékelő modul többletszolgáltatása, hogy a felülethez tartozik egy perces pontosságú időintervallum, mely pontosan meghatározza a felületek aktív időtartamát, így pl.: lehetőségünk van arra, hogy a mozgásérzékelés csak a munkaidőn kívüli órákban legyen aktív (3. ábra).
A Multi I/O kártya lehetőségei A Hexium Kft. által gyártott és kifejlesztett Multi I/O kártya egyrészről lehetőséget biztosít külső jelek fogadására, feldolgozására, másrészről, riasztás esetén a kimeneteken vagy a relén a kívánt riasztási jelet adhatja ki a rendszer. A kártya maximális kiépítésben 16 optocsatolt bemenettel, 16 optocsatolt kimenettel és egy relével rendelkezik. A rendszerbe illesztés során nagy hangsúlyt kapott az, hogy a külső riasztási bemenetek paraméterezése egyszerű legyen, de mégis megoldást nyújtson az egyedi telepítések esetében is.
4. ábra: A külső riasztások kezelése
Mint azt a 4. ábrán láthatjuk, a bemenetekhez rendelhetünk egy logikai 0-s vagy 1es szintet, mely a bemenet riasztott állapotát határozza meg. Beállíthatjuk továbbá az aktív időszakot, mely meghatározza az érzékelő aktív időtartamát, valamint beállíthatjuk még az érzékelőhöz tartozó kamerát is. Amint a külső riasztásokat kezelő modul érzékeli, hogy az adott érzékelő riasztási állapotba került, az érzékelőhöz (bemenethez) rendelt kameráról képrögzítést 5. ábra: A kimenetek felhasználása kezdeményez. A dialógus alsó részén – a telepítést hangjelzéshez megkönnyítendő – a bemenetek pillanatnyi állapota látható. Amikor az esemény-feldolgozó modul érzékeli, hogy riasztás történt, a Multi I/O kártya kimeneteit felhasználva riasztási hangjelzést adhat (beállítási lehetőségeket lásd az 5. ábrán).
Összefoglalás A HV-PCI video-digitalizáló kártyacsalád és VIDOC termékeink sikerét a következő jellemzők hozták: • versenyképes ár • jó skálázhatóság • 100%-os hazai fejlesztés, nagyfokú függetlenség a külföldi gyártóktól • a vevő egyedi, speciális igényeihez való 100%-os illeszkedési lehetőség
Hivatkozások KÉPAF97-Hexium Ladányi Péter, Patkó Tamás, Máthé József, Nagy Tamás: Képfeldolgozás a biztonságtechnikában Magyar Képfeldolgozók és Alakfelismerők Országos Konferenciája, 200-203. oldal, 1997. VIDEOCOMM98-Hexium Ladányi Péter, Patkó Tamás, Máthé József, Nagy Tamás, Nagy Ferenc: Videotechnika a biztonságtechnikai távfelügyeleti rendszerekben, A VIDEOKOMMUNIKÁCIÓ LEHETŐSÉGEI MAGYARORSZÁGON Konferencia, előadásgyűjtemény 73-79. oldal, 1998. DIGVID98-Hexium Ladányi Péter, Patkó Tamás, Máthé József, Nagy Tamás: Digitális Videorendszerek I-III. Cikksorozat, Magyar Biztonságtechnika 1998.