Skip to content

Instantly share code, notes, and snippets.

import serial
from serial import SerialException
import time
from datetime import datetime
import sys
import zmq
from pythonosc import osc_message_builder
from distutils.util import strtobool
context = zmq.Context()
// Draw the predicted bounding box, colorize and show the mask on the image
void ThreadedMaskRCNN::drawBox(Mat& target, int classId, float conf, Rect box, Mat& objectMask)
{
//Draw a rectangle displaying the bounding box
rectangle(target, Point(box.x, box.y), Point(box.x + box.width, box.y + box.height), Scalar(255, 178, 50), 3);
//Get the label for the class name and its confidence
string label = format("%.2f", conf);
if (!classes.empty())
{
#pragma once
// --------------------------------------------------------------
//
// File : ofxICPSample.h
//
// Description : Sample code to estimate relative motion with
// Iterative Closest Point (ICP) algorithm
//
// Environment : c++, openFrameworks
#pragma once
// --------------------------------------------------------------
//
// File : ofxParticleFilterLocalization.h
//
// Description : Mobile robot localization sample code with
// ParticleFilterLocalization (PF)
// The Robot can get a range data from RFID that its position
// known.
#pragma once
// --------------------------------------------------------------
//
// File : ofxGridMapSample.h
//
// Description : Sample code to build grid map
// https://github.com/AtsushiSakai/MATLABRobotics/blob/master/Mapping/GridMapSample/GridMapSample.m
//
// Environment : c++, openFrameworks
#ifndef _HAL_OBJ_H_
#define _HAL_OBJ_H_
/* --COPYRIGHT--,BSD
* Copyright (c) 2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
@dotchang
dotchang / hal.h
Last active January 4, 2017 04:50
#ifndef _HAL_H_
#define _HAL_H_
/* --COPYRIGHT--,BSD
* Copyright (c) 2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
/* --COPYRIGHT--,BSD
* Copyright (c) 2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
/* --COPYRIGHT--,BSD
* Copyright (c) 2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
/* --COPYRIGHT--,BSD
* Copyright (c) 2012, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.