Skip to content

Instantly share code, notes, and snippets.

Gui Meira guimeira

Block or report user

Report or block guimeira

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@guimeira
guimeira / augmentation_layer.py
Last active May 3, 2019
Caffe Python Data Augmentation Layer
View augmentation_layer.py
import caffe
import cv2
import numpy as np
import sys
import re
import random
from Queue import Queue
from threading import Thread
from multiprocessing import cpu_count
@guimeira
guimeira / main.cpp
Created Dec 15, 2017
Using mouse to select image region (OpenCV and C++)
View main.cpp
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
struct SelectionState {
Point startPt, endPt, mousePos;
bool started = false, done = false;
Rect toRect() {
@guimeira
guimeira / MatrixUtils.java
Last active Dec 6, 2017
Moore-Penrose pseudo inverse using matrix-toolkits-java (MTJ)
View MatrixUtils.java
import no.uib.cipr.matrix.DenseMatrix;
import no.uib.cipr.matrix.NotConvergedException;
import no.uib.cipr.matrix.SVD;
public final class MatrixUtils {
/**
* Computes the Moore-Penrose pseudo-inverse.
* Based on Octave's implementation: https://github.com/NexMirror/Octave/blob/6ce11cf520201c66db1135711693af29d3a39d5d/liboctave/array/dMatrix.cc#L652
*/
public static DenseMatrix pseudoInverse(DenseMatrix matrix) {
You can’t perform that action at this time.