Skip to content

Instantly share code, notes, and snippets.

Who created openai?
@salememd
salememd / VideoPreview.java
Created May 4, 2018 14:44
MediaCodec & ImageReader to grab frames
package ly.umbrella.opencvtest2;
import android.content.Context;
import android.graphics.Bitmap;
import android.media.Image;
import android.media.ImageReader;
import android.util.Log;
@salememd
salememd / EigthQ.java
Created December 4, 2017 15:32
8 queens puzzle
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package eigthq;
import java.util.ArrayList;
import java.util.LinkedList;
public Meta getMatch(Mat frame) {
try {
FeatureDetector detector = FeatureDetector.create(FeatureDetector.ORB);
DescriptorExtractor descriptor = DescriptorExtractor.create(DescriptorExtractor.ORB);;
DescriptorMatcher matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMING);
//first image
Mat img1 = frame.clone();//Imgcodecs.imread("C:\\Users\\Dexter\\Desktop\\opencv\\2\\333.png", 0);