Saravanan666/pypi-org huggingface dataset:
Package: camerahub
CameraHubCameraHub is a web app for film photography that can be used to track cameras, lenses, accessories, films, negatives and prints, to fully
catalogue a collection of photographic equipment as well as the pictures that are made with them.It replaces an earlier command-line project, calledPhotoDB, which has now been deprecated.Installing CameraHubThere are several ways of installing CameraHub, depending on your needs:With PipFrom sourceWith DockerWith KubernetesConfiguring CameraHubCameraHub requires almost no additional config to run with default settings. However it is insecure in this configuration so at leastCAMERAHUB_SECRET_KEYandCAMERAHUB_PRODmust be set if you are running in production.The following environment variables are supported:CAMERAHUB_ADMIN_EMAILEmail address for theadminaccount
Default:admin@example.comCAMERAHUB_ADMIN_PASSWORDPassword for theadminaccount
Default:adminCAMERAHUB_DB_ENGINEDatabase engineDefault:django.db.backends.sqlite3CAMERAHUB_DB_HOSTDatabase hostname or IP addressif an engine other than SQLite is configuredCAMERAHUB_DB_NAMEDatabase schema or path to SQLite dbdb/db.sqlite3CAMERAHUB_DB_PASSDatabase passwordif an engine other than SQLite is configuredCAMERAHUB_DB_PORTDatabase portif an engine other than SQLite is configuredCAMERAHUB_DB_USERDatabase usernameif an engine other than SQLite is configuredCAMERAHUB_PRODEnableDjango production modeDefault:falseCAMERAHUB_SECRET_KEYRandom secret value. The default string is for testing only and is insecure in production. Generate a new onehereDefault:OverrideMe!CAMERAHUB_EMAIL_BACKENDEmail backendDefault:django.core.mail.backends.filebased.EmailBackendCAMERAHUB_EMAIL_USE_TLS'Enable TLS for SMTPCAMERAHUB_EMAIL_USE_SSL'Enable TLS for SMTPCAMERAHUB_EMAIL_HOSTSMTP server hostnameCAMERAHUB_EMAIL_HOST_USERSMTP server usernameCAMERAHUB_EMAIL_HOST_PASSWORDSMTP server passwordCAMERAHUB_EMAIL_PORTSMTP server port numberCAMERAHUB_FROM_EMAILFrom email addressDefault:noreply@camerahub.infoCAMERAHUB_DOMAINSite domainDefault:camerahub.infoCAMERAHUB_STATUS_URLURL for a status pageFixturesBase data is supplied as fixtures and must be manually imported after installation. These arenotidempotent so should only be run once.This data includes things like EXIF exposure programs, film formats, etc that are required to make CameraHub useful.poetryrunpythonmanage.pyloaddata--appschemaConditionExposureProgramFormatManufacturerFilmstockMeteringModeMeteringTypeMountNegativeSizeProcessShutterSpeedThere is also some test data like cameras and negatives which shouldn't be imported into a production deployment.See alsoChangelogDocs
Package: camerahub-tagger
CameraHub TaggerCameraHub Tagger is a companion command-line app forCameraHubto tag JPG
scans of negatives with EXIF metadata from the CameraHub API. This means you can organise your film
scans in a digital photo management app with full metadata.To use CameraHub Tagger, you must already have entered your cameras, lenses, films and negatives into CameraHub. When you scan your negatives, name them consistently like{FILM}-{FRAME}-IMG0001.jpg(for example45-12-IMG0001.jpgis frame 12 on film 45).Run CameraHub Tagger in the same directory. CameraHub Tagger will attempt to match the JPGs with the
negatives by using the filename (it will ask you if it can't figure it out). It will then generate a
unique ID for that scanned JPG to tie it conclusively to the negative. Once the link is made, CameraHub
Tagger will retrieve all data about that negative, film, lens and camera and use it to generate EXIF
metadata, the same as digital cameras do. It is safe to run CameraHub Tagger multiple times on the same
files, as only changed tags are written.When your images have been tagged, any digital photo app will read and display these tags in the same
way as digital photos.InstallationInstall fromPyPIwith Pip:pip install camerahub-taggerThis installs ataggerbinary in your$PATH.Usagetagger [-h] [-r] [-a] [-y] [-d] [-f FILE] [-p PROFILE]-h --helpDisplay help message and exit-r --recursiveSearch for scans recursively from current directory-a --autoDon't prompt user to identify scans, only guess based on filename-y --yesAccept all changes without confirmation-d --dry-runDon't write any tags to image files-d --update-onlyOnly update tags which have previously been written. Don't make any new Scan records in CameraHub.-f --file FILEImage file to be tagged. If not supplied, tag everything in the current directory.-p --profile PROFILECameraHub connection profile. Default:prod.-c --clearClear existing EXIF metadata from the image file.ConfigCameraHub Tagger needs some basic connection details to connect to CameraHub.
On first run, it will ask for credentials for CameraHub and save them for future use.If you need multiple profiles (e.g. if you have multiple users, or you need to connect to
a development instance of CameraHub) you can configure the extra profiles manually by editing~/camerahub.iniand adding more blocks.The names of each profile are arbitrary, but CameraHub Tagger will automatically use theprodprofile
unless you override it with the--profileoption. Here's an example:[prod]server=https://camerahub.info/apiusername=anseladamspassword=yosemite[dev]server=https://dev.camerahub.info/apiusername=annieleibovitzpassword=johnandyoko[local]server=http://127.0.0.1:8000/apiusername=adminpassword=admin
Package: camera-intrinsics
Camera IntrinsicsA small package that supports applying image transformations, e.g. cropping or resizing, to the camera intrinsics.This package is under development and not well tested nor stable.Installationpip install camera-intrinsicsIntrinsicsCamera intrinsics are python dicts with the keysheight, width, fx, fy, cx, cy, options.Exampleimportcamera_intrinsicsascamintr=cam.intrinsics(width=128,height=96,fx=128.0,fy=128.0,cx=63.5,cy=47.5)# Make sure to be clear about half_pixel_centers! Read the doc below.print(intr)>>>{'height':96,'width':128,'fx':128.0,'fy':128.0,'cx':63.5,'cy':47.5,'options':''}OptionsThe options string is thejoinof the single options with a semincolon,. The available options are listed below.Pixel Coordinate ConventionThere are mainly two conventions for the pixel coordinates. The preferred one within this package uses(0,0)as the coordinate for the top-left pixel and its options string is"". The other convention uses(.5, .5)as the coordinate for the top-left pixel and its options string is"half_pixel_centers". Be careful to select the right convention when creating the intrinsics. Here is a list of toolboxes and their conventionsNohalf_pixel_centers:
DSO (link),
MATLAb Calibration Toolbox (link),
Berkeley Automation (link)half_pixel_centers:
COLMAP (link),
FastMVSNet (link)MethodsCurrently the following methods are supported:intrinsics: Make intrinsicscrop: Crop intrinsicsresize: Resize intrinsics
Package: cameralogger
Camera loggerTools to record and decorate camera images to create timelapses etc.Supported camerasZWO ASI cameras are supported via thezwoasiPython module
(https://github.com/stevemarple/python-zwoasi).Raspberry Pi cameras are supported via the PiCamera Python module.Credits“cameralogger” is written and maintained by Steve Marple.ContributorsPlease append your name here when you submit your first pull request.
Package: cameraman
CameramanCamera Control UtilityFeaturesTODOBefore Codingcreate a virtual env::python3 -m venv venv
source venv/bin/activate
make install-testing-requisitesCreditsThis package was created withCookiecutterand thecib_pypackageproject template.History0.1.0 (2024-01-10)First release on PyPI.
Package: camera-stage-mapping
Camera Stage Mapping calibrationThis Python module allows you to calibrate a microscope's stage against the camera.  By moving the sample a known number of steps, and tracking how far the image translates, it is possible to recover the number of steps per pixel.  This code goes a step further, and recovers a 2x2 affine transformation matrix, so it will cope with rotation, flipping, and non-uniform scaling of the X and Y axes.  The calibration routines are designed to be relatively robust and minimally parameterised, so they start by determining a sensible step size automatically.As part of the calibration, you can use either FFT-based or directly calculated cross correlation to track motion of the sample.  This code is probably useful on its own, and is found in thefft_image_trackingandcorrelation_image_trackingsubmodules.  The underlying mechanism of tracking stage and camera coordinates simultaneously is handled by theCameraStageTrackerclass, incamera_stage_tracker.  The main calibration function iscamera_stage_calibration_1d.calibrate_backlash_1d.  For 2D calibration, I recommend running this once for X and once for Y, then usingcamera_stage_calibration_1d.image_to_stage_displacement_from_1dto combine the two calibrations.  This is more robust than the 2D grid calibration method.Hardware interfaceRather than tie these functions to a specific class interface, as found in many lab control frameworks, the calibration routines simply require functions to be passed in as arguments.  This is done for maximum flexibility, and to impose the fewest necessary constraints on the hardware we are controlling.  In the future, we may define a class interface to use, and would welcome input on how to do this without forcing a particular taxonomy of laboratory instruments upon everyone using the library.Installingpip install camera-stage-mappingThis package is published on PyPI and can be installed usingpip.  It's managed usingpoetryand can be installed by cloning the repository and runningpoetry install.  For details of how to set up a development environment, please seeCONTRIBUTING.DocumentationThe functions all have fairly extensive docstrings and the module is documented onreadthedocs.
Package: camerata
CamerataA library for querying and capturing from cameras, based onnokhwacrate.ExamplesQuery available cameras:print(*camerata.query(),sep='\n')Example output:CameraInfo(index=2, name='UVC Camera (046d:0809)', description='Video4Linux Device @ /dev/video2', misc='')
CameraInfo(index=0, name='USB2.0 VGA UVC WebCam: USB2.0 V', description='Video4Linux Device @ /dev/video0', misc='')Save an image (note: requires pillow to be installed):importcamerataimporttimecam=camerata.Camera(camerata.query()[0])# Open a camerawhilecam.poll_frame_pil()isNone:# Note that .poll_frame_* functions never blockstime.sleep(0.1)# Wait until we get at least one frame from the camera#time.sleep(1) # You might want to wait a bit longer while camera is calibratingimg=cam.poll_frame_pil()img.save("img.png")See examples/ for more
Package: camera-util
A collection of python threaded camera support routines forUSB and laptop internal webcamsRTSP streamsMIPI CSI cameras (Raspberry Pi, Jetson Nano)FLIR blackfly USB cameraSave data as, HDF5, TIFF, AVI, MKVWorks on most platforms: Windows, MacOS, UnixFor detailed documentation pleaseReadme.md.Example program using cameraimportcv2importloggingimporttimeconfigs={'camera_res':(1920,1080),# CAP_PROP_FRAME_WIDTH, CAP_PROP_FRAME_HEIGHT'exposure':-6,# depends on camera: e.g. -5 =(2^-5)=1/32,# 0=auto, 1...max=frame interval in microseconds'autoexposure':3.0,# depends on camera: 0.25 or 0.75(auto), -1,0,1'fps':30,# fps'fourcc':"MJPG",# cv2 camera only: MJPG, YUY2, YUYV'buffersize':-1,# default is 4 for V4L2, max 10,'output_res':(-1,-1),# output resolution (-1=no change)'flip':0,# 0=no rotation'displayfps':5# frame rate for display server}ifconfigs['displayfps']>=configs['fps']:display_interval=0else:display_interval=1.0/configs['displayfps']# Open display windowcv2.namedWindow('Camera',cv2.WINDOW_AUTOSIZE)# or WINDOW_NORMAL# Setting up logginglogging.basicConfig(level=logging.DEBUG)# options are: DEBUG, INFO, ERROR, WARNINGlogger=logging.getLogger("Main")# Setting up storagefromcamera.streamer.mkvstorageserverimportmkvServermkv=mkvServer("C:\\temp\\"+"Test.mkv",configs['fps'],configs['camera_res'])mkv.start()# Create camera interfacefromcamera.capture.cv2captureimportcv2Capturecamera=cv2Capture(configs,0)camera.start()stop=Falsewhile(notstop):current_time=time.time()# Wait for new image(frame_time,frame)=camera.capture.get(block=True,timeout=None)# take care of camera log messageswhilenotcamera.log.empty():(level,msg)=camera.log.get_nowait()logger.log(level,msg)# Put image into storage queueifnotmkv.queue.full():mkv.queue.put_nowait((frame_time,frame))# take care of storage log messageswhilenotmkv.log.empty():(level,msg)=mkv.log.get_nowait()logger.log(level,msg)# Displayif(current_time-last_display)>=display_interval:cv2.imshow('Camera',frame)ifcv2.waitKey(1)&0xFF==ord('q'):stop=Trueifcv2.getWindowProperty('Camera',0)<0:stop=Truelast_display=current_time# Do other things# Clean upcamera.stop()mkv.stop()cv2.destroyAllWindows()
Package: camera-z-transition
camera_z_transitionDescriptionThis is a small python package to estimate the camera motion/zoom
on the z axis.what it is:Estimates the camera motion/zoom on the z axiswhat it is NOT:It does not calcualte optical flow (although you can see example of that in
the example.py)It is not a metric estimation. It will not tell you the exact amount
of transition on the z axis in meter/feetIt does not estimate any other camera motion such az tilling, panning,
tracking  etc.Installpip install cam-motion-fieldUsagefromcamera_z_transitionimportestimate_z_transitionimportnumpyasnp# This is the width and height of the image on which you perform the# optical flow calculationwidth=1080height=720# You should change this to some real optical flow calculation! see example# in example.py. Both origins and displacements should be a list of 2D vectors.origins=np.ones((10,2))*(1080//2)+10displacements=np.ones((10,2))*(1080//2)+20# Normalize and scale the optical flow first!origins[:,0]=(origins[:,0]/width)-0.5origins[:,1]=(origins[:,1]/height)-0.5displacements[:,0]=(displacements[:,0]/width)-0.5displacements[:,1]=(displacements[:,1]/height)-0.5# Estimate transition on the z axisz=estimate_z_transition(origins,displacements)print(z)Parameters for estimate_z_transition()
----------
origins: numpy array,
    Set of origin vectors. Shape must be (nr_of_points, 2). MUST BE ZERO CENTERED AND SCALED!
displacements: numpy array,
    Set of displacement vectors (coordinates). Shape must be (nr_of_points, 2)
focal_lengthHow it worksGiven any point in the image plane (X,Y) we can estimate their new position
on the image plane (X',Y') given a transition on the x axis[1].Where parameter X and Y are coordinates on the image plane
andis the transition on the z axis. X' and Y' are the new coordinates
on the image plane given the transition parameter.
Notice that both equations require a parameterfwhich is the focal lenght
if the camera. Interestingly it does not seem to have a noticeable effect on the
output. It seams that untilfand (X,Y) has sensible values the
exact value offdoes not matter. It is important that I do not have any
mathematical proof on this. It is purely come from visually observing
the behaviour of the function with differentfand (X,Y). You can have a
look here:link to PlotGiven an observed optical flow it is easy to perform a parameter search
forusing the equations above.ResultsGiven two consecutive images from a camera:We first obtain the optical flow using opencvThe estimatedparameter value for the images above is 0.053796382332247594The gif below shows the original optical flow and the one artificially
generated using the estimatedparameter.References[1]Srinivasan, M.V., Venkatesh, S., Hosie, R.: Qualitative estimation of camera motion
parameters from video sequences. Pattern Recognition 30(4), 593–606 (1997)Bib@article{Srinivasan at al.,
  title={Qualitative estimation of camera motion parameters from video sequences},
  author={Srinivasan, Mandyam V and Venkatesh, Svetha and Hosie, Robin},
  journal={Pattern Recognition},
  volume={30},
  number={4},
  pages={593--606},
  year={1997},
  publisher={Elsevier}
}
Package: camerge
CamergeA simple library for merging multiple calendars into one.
It also allows anonymization of the events, so nobody will be able to see the summary of the event.What this solves:
You have multiple calendars, and you want to share availability inicalformat with some other people.
This tool takes your private calendars (inicalformat), merges them, optionally anonymize them and creates newicalcalendar with the correct availability data.This project is a minimal library but can be very easily used as an API for example:importdatetimefromfastapiimportFastAPI,Responsefromcamergeimportmerge_calendarsapp=FastAPI()@app.get("/")asyncdefcalendar():"""This method generates ical data for any calendar app."""ical=merge_calendars(calendar_name='My Availability',calendar_domain='my.calendar.example.com',calendar_data=[# take this google ical stream and anonymize events (no event names shown)("https://calendar.google.com/calendar/ical/me@me.com/private-x/basic.ics",True),# take this event stream and do not anonymize event summary("https://p30-caldav.icloud.com/published/2/xxx",False),],# take event availability from these email addresses, these should be your own# email addresses associated with the calendar accountsknown_emails=['me@example.com','otherme@example.com'],# do not include events that are older than thisskip_events_before=datetime.date(2021,1,1))returnResponse(content=ical,media_type='text/calendar')DependenciesThis project is based onicalendar.
Package: camfi
camfiCamera-basedAnalysis andMonitoring ofFlyingInsectsCamfi is a method for the long-term non-invasive monitoring of the activity and
abundance of low-flying insects using inexpensive wildlife cameras. It provides
utilities for measuring the wingbeat frequency of insects in still images, based
on the motion blurs drawn on the image sensor by the insect moving through the
air. For large-scale monitoring projects, camfi enables automatic annotation of
flying insects using the Mask R-CNN framework.Please see thedocsfor
installation and usage instructions.
Package: camfitool
Camera Fault Injection ToolThis tool is a simple interface that allows injection of image faults into robot cameras. Thanks to this interface, you can create new image libraries by injecting the fault types you have determined, both real-time to TOF and RGB type ROS cameras, and to the image libraries previously recorded by these cameras. For more information about the purpose of this tool:https://arxiv.org/abs/2108.13803Developed by Alim Kerem Erdogmus from Inovasyon Muhendislik (c) 2021!!! THIS IS ALPHA VERSION. FOR STABLE CAMFITOOL VERSION, PLEASE INSTALL FROM GITHUB REPOSITORY. !!!For More Details:ROS Wiki page:http://wiki.ros.org/camfitoolGithub repository:https://github.com/inomuh/camfitoolTool Features (in v1.2)You can apply the faults you choose in the configuration menu to the images in the image library you want, and save these wrong images to the folder you want. So you can create your faulty image library.You can apply these faults to all images as well as to a random number of images, creating a mixed library of faulty images without touching the remaining images (only offline fault application).You can save the configuration of the fault you have applied, and view the fault plans you have saved as you wish.You can specify the rate of fault to be applied.Three different fault types can be applied offline to images (with .bmp extension) obtained from TOF camera and six different fault types can be applied offline to images (with .png/.jpg extension) obtained from RGB camera.For now, six different fault types can be applied real-time stream obtained from RGB camera (TOF Realtime FI will be added).You can use the ROS Noetic version (noetic-version) or the standard version (current v1.2.3).You can monitor the ROS Camera node.You can specify the rate of real-time fault injecting frequency to be applied.InstallationYou can install CamFITool with PyPipip3 install camfitoolor you can install from Github repositorygit clone https://github.com/inomuh/camfitoolFor trying ROS package version of CamFITool:git clone https://github.com/inomuh/camfitool -b noetic-versionFor Using CamFIToolpython3 -m camfitoolLicenseSee theLICENSEfile for license rights and limitations (Apache-2.0 Licence).
Package: camination
Stop Motion, Timelapse and Animation using Web CamsThis software was originally created for use with Scouts - that is children
aged 10 1/2 - 14. Worked really well for them.FeaturesLinux based using normal webcams (Raspberry Pi will work fine)Creates AVIs - using avconvAble to see your progress easilyOnion skinning - making ad hoc stop motion simplerSimple operationspace - take photop (or r) - record a previewescape - quit - don’t record a videoSimple code - using python and pygameFrame based - meaning recreating the animation time and again doesn’t
result in video degradation.At present it’s based around stop motion, but I also have some time lapse
code (including de-duplication of frames) which will be added to this.It’s aimed to be quick, simple and fun to use.There are missing features.Notably I think these should be added at some point:Audio recordingFrame deletion/undoFrame counter / time into video counterRelease HistoryRelease History:0.1.0 - UNRELEASED - Initial version used with scouts.0.1.1 - TBD - Packaged up, and documented.Michael Sparks, February 2017
Package: camlab
CamLabplay with camera poseproject a world-coordinate point to screen coordniate:importnumpyasnpfromcamlabimportCameraObjcam=CameraObj()# init intrinsicsfocal=1111.1w=800h=800cam.manual_init(focal,w,h)# init extrinsicsextri=np.array([[-9.9990e-01,4.1922e-03,-1.3346e-02,-5.3798e-02],[-1.3989e-02,-2.9966e-01,9.5394e-01,3.8455e+00],[-4.6566e-10,9.5404e-01,2.9969e-01,1.2081e+00],[0.0,0.0,0.0,1.0]])cam.load_extrinsic(extri)# coordinates transformationp_in_world=[0,0,0]p_in_screen=cam.world2screen(p_in_world,to_int=True)print(p_in_screen)# [400, 400]make a ray from a screen point:importnumpyasnpfromcamlabimportCameraObjintri=[[1111.0,0.0,400.0],[0.0,1111.0,400.0],[0.0,0.0,1.0]]extri=np.array([[-9.9990e-01,4.1922e-03,-1.3346e-02,-5.3798e-02],[-1.3989e-02,-2.9966e-01,9.5394e-01,3.8455e+00],[-4.6566e-10,9.5404e-01,2.9969e-01,1.2081e+00],[0.0,0.0,0.0,1.0]])cam_obj=CameraObj(intri)cam_obj.load_extrinsic(extri)p=(400,400)# screen pointrayo,rayd=cam_obj.make_ray(p)print(rayo,rayd)# ray origin and ray direction# (rayd - rayo) represents a point at the ray.p_=cam_obj.world2screen(rayd-rayo,to_int=True)# reproject the ray point to screenprint(p_)# (400, 400)