Back to Jetson Inference

Python: package jetson.utils

docs/html/python/jetson.utils.html

latest11.6 KB
Original Source

|

jetson.utils | index
[/usr/lib/python3.8/dist-packages/jetson/utils/__init__.py](file:///usr/lib/python3.8/dist-packages/jetson/utils/ init.py) |

#print("jetson.utils.__init__.py")

|
Package Contents | | | |

| | | | |

|

|
Classes | | | | builtins.object Log cudaFont cudaMemory cudaImage glDisplay gstCamera videoOutput videoSource

|
class Log (builtins.object) | | | Logging interface
| | | Class methods defined here:
Debug (...) from builtins.typeLog a debug message Error (...) from builtins.typeLog an error message GetFilename (...) from builtins.typeGet the current logging level (as a string) GetLevel (...) from builtins.typeGet the current logging level (as a string) Info (...) from builtins.typeLog an info message SetFilename (...) from builtins.typeSet the current logging level (as a string) SetLevel (...) from builtins.typeSet the current logging level (as a string) Success (...) from builtins.typeLog a success message Usage (...) from builtins.typeGet the command-line usage string Verbose (...) from builtins.typeLog a verbose message Warning (...) from builtins.typeLog a warning message |

|
class cudaFont (builtins.object) | | | Bitmap font overlay rendering with CUDA
| | | Methods defined here:
GetSize (...)Return the size of the font (height in pixels) OverlayText (...)Render the font overlay for a given text string __init__ (self, /, *args, **kwargs)Initialize self. See help(type(self)) for accurate signature.


Static methods defined here:
__new__ (*args, **kwargs) from builtins.typeCreate and return a new object. See help(type) for accurate signature.


Data descriptors defined here:
Black Black color tuple Blue Blue color tuple Brown Brown color tuple Cyan Cyan color tuple Gray Gray color tuple Gray10 Gray color tuple (10% alpha) Gray20 Gray color tuple (20% alpha) Gray30 Gray color tuple (30% alpha) Gray40 Gray color tuple (40% alpha) Gray50 Gray color tuple (50% alpha) Gray60 Gray color tuple (60% alpha) Gray70 Gray color tuple (70% alpha) Gray80 Gray color tuple (80% alpha) Gray90 Gray color tuple (90% alpha) Green Green color tuple Lime Lime color tuple Magenta Magenta color tuple Orange Orange color tuple Purple Purple color tuple Red Red color tuple Tan Tan color tuple White White color tuple Yellow Yellow color tuple |

|
class cudaImage (cudaMemory) | | | CUDA image
| | | Method resolution order:cudaImagecudaMemorybuiltins.object


Methods defined here:
__delitem__ (self, key, /)Delete self[key]. __getitem__ (self, key, /)Return self[key]. __init__ (self, /, *args, **kwargs)Initialize self. See help(type(self)) for accurate signature. __len__ (self, /)Return len(self). __setitem__ (self, key, value, /)Set self[key] to value. __str__ (self, /)Return str(self).


Static methods defined here:
__new__ (*args, **kwargs) from builtins.typeCreate and return a new object. See help(type) for accurate signature.


Data descriptors defined here:
__array_interface__ Numpy __array_interface__ dict __cuda_array_interface__ Numba __cuda_array_interface__ dict channels Number of color channels in the image format Pixel format of the image height Height of the image (in pixels) shape Image dimensions in (height, width, channels) tuple timestamp Timestamp of the image (in nanoseconds) width Width of the image (in pixels)


Data descriptors inherited from cudaMemory:
freeOnDelete Will the CUDA memory be released when the Python object is deleted? gpudata Address of CUDA memory (PyCUDA interface) mapped Is the memory mapped to CPU also? (zeroCopy) ptr Address of CUDA memory size Size (in bytes) |

|
class cudaMemory (builtins.object) | | | CUDA memory
| | | Methods defined here:
__init__ (self, /, *args, **kwargs)Initialize self. See help(type(self)) for accurate signature. __str__ (self, /)Return str(self).


Static methods defined here:
__new__ (*args, **kwargs) from builtins.typeCreate and return a new object. See help(type) for accurate signature.


Data descriptors defined here:
freeOnDelete Will the CUDA memory be released when the Python object is deleted? gpudata Address of CUDA memory (PyCUDA interface) mapped Is the memory mapped to CPU also? (zeroCopy) ptr Address of CUDA memory size Size (in bytes) |

|
class glDisplay (builtins.object) | | | OpenGL display window
| | | Methods defined here:
BeginRender (...)Clear window and begin rendering a frame EndRender (...)Finish rendering and refresh / flip the backbuffer GetFPS (...)Return the average frame time (in milliseconds) GetHeight (...)Return the height of the window (in pixels) GetWidth (...)Return the width of the window (in pixels) IsClosed (...)Returns true if the window has been closed IsFullscreen (...)Returns true if the window is fullscreen IsMaximized (...)Returns true if the window is maximized IsOpen (...)Returns true if the window is open ProcessEvents (...)Process UI events Render (...)Render a CUDA float4 image using OpenGL interop RenderOnce (...)Begin the frame, render a CUDA float4 image using OpenGL interop, and then end the frame SetBackgroundColor (...)Set the window background color SetFullscreen (...)Sets the window to fullscreen mode based on bool argument SetMaximized (...)Sets the window to maximized/unmaximized based on bool argument SetTitle (...)Set the window title string __init__ (self, /, *args, **kwargs)Initialize self. See help(type(self)) for accurate signature.


Static methods defined here:
__new__ (*args, **kwargs) from builtins.typeCreate and return a new object. See help(type) for accurate signature. |

|
class gstCamera (builtins.object) | | | MIPI CSI or USB camera using GStreamer
| | | Methods defined here:
Capture (...)Capture a camera frame (in raw format by default) CaptureRGBA (...)Capture a camera frame and convert it to float4 RGBA Close (...)Stop streaming camera frames GetHeight (...)Return the height of the camera (in pixels) GetWidth (...)Return the width of the camera (in pixels) Open (...)Open the camera for streaming frames __init__ (self, /, *args, **kwargs)Initialize self. See help(type(self)) for accurate signature.


Static methods defined here:
__new__ (*args, **kwargs) from builtins.typeCreate and return a new object. See help(type) for accurate signature. |

|
class videoOutput (builtins.object) | | | videoOutput interface for streaming video and images
| | | Methods defined here:
Close (...)Stop streaming video frames GetFrameRate (...)Return the frames per second of the video output GetHeight (...)Return the height of the video output (in pixels) GetOptions (...)Return the dict representation of the videoOptions of the output GetWidth (...)Return the width of the video output (in pixels) IsStreaming (...)Return true if the stream is open, return false if closed Open (...)Open the video output for streaming frames Render (...)Render a frame (supplied as a cudaImage) SetStatus (...)Set the status string (i.e. window title bar text) __init__ (self, /, *args, **kwargs)Initialize self. See help(type(self)) for accurate signature.


Static methods defined here:
Usage (...)Return help text describing the command line options __new__ (*args, **kwargs) from builtins.typeCreate and return a new object. See help(type) for accurate signature. |

|
class videoSource (builtins.object) | | | videoSource interface for cameras, video streams, and images
| | | Methods defined here:
Capture (...)Capture a frame and return the cudaImage Close (...)Stop streaming video frames GetFrameCount (...)Return the number of frames captured so far GetFrameRate (...)Return the frames per second of the video source GetHeight (...)Return the height of the video source (in pixels) GetOptions (...)Return a dict representing the videoOptions of the source GetWidth (...)Return the width of the video source (in pixels) IsStreaming (...)Return true if the stream is open, return false if closed Open (...)Open the video source for streaming frames __init__ (self, /, *args, **kwargs)Initialize self. See help(type(self)) for accurate signature.


Static methods defined here:
Usage (...)Return help text describing the command line options __new__ (*args, **kwargs) from builtins.typeCreate and return a new object. See help(type) for accurate signature. |

|

|
Functions | | | | adaptFontSize (...)Determine an appropriate font size for the given image dimension cudaAllocMapped (...)Allocate CUDA ZeroCopy mapped memory cudaConvertColor (...)Perform colorspace conversion on the GPU cudaCrop (...)Crop an image on the GPU cudaDeviceSynchronize (...)Wait for the GPU to complete all work cudaDrawCircle (...)Draw a circle with the specified radius and color centered at position (x,y) cudaDrawLine (...)Draw a line with the specified color and line width from (x1,y1) to (x2,y2) cudaDrawRect (...)Draw a rect with the specified color at (left, top, right, bottom) cudaFromNumpy (...)Copy a numpy ndarray to CUDA memory cudaMalloc (...)Allocated CUDA memory on the GPU with cudaMalloc() cudaMemcpy (...)Copy src image to dst image (or if dst is not provided, return a new image with the contents of src) cudaNormalize (...)Normalize the pixel intensities of an image between two ranges cudaOverlay (...)Overlay the input image onto the composite output image at position (x,y) cudaResize (...)Resize an image on the GPU cudaToNumpy (...)Create a numpy ndarray wrapping the CUDA memory, without copying it loadImage (...)Load an image from disk into GPU memory loadImageRGBA (...)Load an image from disk into GPU memory as float4 RGBA logUsage (...)Return help text describing the command line arguments of the logging interface saveImage (...)Save an image to disk saveImageRGBA (...)Save a float4 RGBA image to disk |

|
Data | | | | VERSION = '1.0.0' |