ncsuarc/ids: Interface for IDS machine vision cameras - GitHub
文章推薦指數: 80 %
A module for interfacing with IDS Imaging machine vision cameras. This module wraps the IDS uEye SDK, providing a convient Python interface to much of the ... Skiptocontent {{message}} ncsuarc / ids Public Notifications Fork 36 Star 37 InterfaceforIDSmachinevisioncameras Viewlicense 37 stars 36 forks Star Notifications Code Issues 12 Pullrequests 4 Actions Projects 0 Wiki Security Insights More Code Issues Pullrequests Actions Projects Wiki Security Insights master Branches Tags Couldnotloadbranches Nothingtoshow Loading {{refName}} default Couldnotloadtags Nothingtoshow {{refName}} default Loading 1 branch 0 tags Code Loading Latestcommit Gitstats 108 commits Files Permalink Failedtoloadlatestcommitinformation. Type Name Latestcommitmessage Committime ids_core .gitignore LICENSE README.md ids.py setup.py Viewcode MAINTAINERSWANTED IDSPythonModule Requirements Buildingandinstalling Usage ColorModes Additionalinformation README.md MAINTAINERSWANTED Thisprojecthasbeenunmaintainedsincemid2016.Sincetheclubnolonger usesIDScamerasandnocurrentmemberwaspresentwhenthislibrarywasin use,weareunlikelytomergeanypullrequestsorcommentonanyissues. Ifyouareinterestedinmaintainingtheproject,pleasecommentonthe [email protected]. IDSPythonModule AmoduleforinterfacingwithIDSImagingmachinevisioncameras. ThismodulewrapstheIDSuEyeSDK,providingaconvientPythoninterface tomuchoftheSDK.Theids.Cameraobjectprovidesattributesforeasily controllingcamerasettingsandcapturingimages. Requirements TheidsmoduleiswritteninPythonandC,usingthePythonCAPI,andsupports bothPython2andPython3.IthasbeentestedusingPython2.7andPython3.2. ThemodulehasonlybeentestedonLinux,andlikelydoesnotsupportWindows. Buildrequirements: IDSuEyeSDK SDKversion4.20orhigherissupported TheSDKcanbeacquiredfromthe IDSwebsite Buildingandinstalling Oncealldependenciesaremet,itissimpletobuildandinstallthemodule: $pythonsetup.pyinstall Or,forPython3: $python3setup.pyinstall Ofcourse,iftheinstallationlocationrequiresrootpermissions,sudomay benecessary. Usage Theidsmodulemakesiteasytocontrolacamera.JustinitializetheCamera objectandsettheattributesofinterest,thenstartimagecapture. >>>importids >>>cam=ids.Camera() >>>cam.color_mode=ids.ids_core.COLOR_RGB8#GetimagesinRGBformat >>>cam.exposure=5#Setinitialexposureto5ms >>>cam.auto_exposure=True >>>cam.continuous_capture=True#Startimagecapture YoucangetimagesfromthecameraasaNumpyarray >>>img,meta=cam.next()#GetimageasaNumpyarray PILprovidesawiderangeofformatstosavein. >>>fromPILimportImage >>>pil_img=Image.fromarray(img) >>>pil_img.save("pil.jpg",quality=95) OpenCValsoallowsyoutosaveimages. >>>importcv2 >>>bgr_img=cv2.cvtColor(img,cv2.COLOR_RGB2BGR) >>>cv2.imwrite('cv2.jpg',bgr_img)#cv2.imwritetakesaBGRimage Thetiffutilsmodulecanbeusedto saverawbayerdataasaDNG.Useoneoftheids.ids_core.COLOR_BAYERcolor modes. >>>cam.continuous_capture=False#Stopcapturetochangecolormode >>>cam.color_mode=ids.ids_core.COLOR_BAYER_16 >>>cam.continuous_capture=True >>>img,meta=cam.next() >>>importtiffutils >>>tiffutils.save_dng(img,"image.dng") Alternatively,theIDSuEyeSDKprovidesafunctionforsavingimages.The cameramustbeinaBGRmodeforJPEGs. >>>cam.continuous_capture=False#Stopcapturetochangecolormode >>>cam.color_mode=ids.ids_core.COLOR_BGR8 >>>cam.continuous_capture=True >>>meta=cam.next_save("ids.jpg") ColorModes Itisimportanttotakethecolormodeimagesarecapturedinintoaccount, particularlyforsavingimages.Differentformatsandimagelibrarieshave differentexpectationsoftheformatimagesarestoredin,socapturingimages inthewrongformatmayresultinimageswithswappedcolorchannels. Thecolormodeconstantsareprovidedintheidsmoduleas ids.ids_core.COLOR_*.Thecolormodecanbepassedintothecolor keywordargumentoftheids.Cameraobject,orsetwhileimagecapture isnotrunningwiththeids.Camera.color_modeattribute. TheIDSuEyeSDKimagingsavingfunctions,usedbyCamera.next_save()copy imagedatadirectly,sotheappropriatemodefortheformatmustbeused. JPEGimagesarestoredinaBGRformat,whileBMPandPNGareRGB. Differentlibrariesexpectimagesindifferentformat.PILexpectsimagesto beinanRGBformat.OpenCVsupportsmanyformats,butgenerallyexpectsBGR data.However,cv2.cvtColor()supportsconversionsbetweenmanyformats. Additionalinformation TheIDSuEyedocumentation isausefulsourceofinformationaboutthefeaturesprovidedbytheIDS camerasanduEyeSDK,andbyextension,thismodule. About InterfaceforIDSmachinevisioncameras Resources Readme License Viewlicense Stars 37 stars Watchers 17 watching Forks 36 forks Releases Noreleasespublished Packages0 Nopackagespublished Contributors5 Languages C 87.7% Python 12.3% Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.
延伸文章資訊
- 1ncsuarc/ids: Interface for IDS machine vision cameras - GitHub
A module for interfacing with IDS Imaging machine vision cameras. This module wraps the IDS uEye ...
- 2Python Reporter.ids方法代碼示例- 純淨天空
本文整理匯總了Python中reporter.Reporter.ids方法的典型用法代碼示例。如果您正苦於以下問題:Python Reporter.ids方法的具體用法?Python Repor...
- 3Using PyuEye - IDS Imaging Development Systems GmbH
Image acquisition and camera parameter settings via PyuEye Python interface of IDS Software Suite.
- 4Python id() 函数 - 菜鸟教程
Python id() 函数Python 内置函数描述id() 函数返回对象的唯一标识符,标识符是一个整数。 CPython 中id() 函数用于获取对象的内存地址。 语法id 语法: id([...
- 5IDS Software Suite: PyuEye - uEye interface for Python
IDS Software Suite: PyuEye - uEye interface for Python. Contents. PyuEye interface 4.95.0; PyuEye...