Skip to content

Instantly share code, notes, and snippets.

@null-product
null-product / CanvasView.java
Last active November 30, 2020 22:07
CanvasでBitmap画像に図形を重ねて描画
public class CanvasView extends View {
private Bitmap mBitmap;
List<List<Point>> mPoints;
public CanvasView(Context context, AttributeSet attrs) {
super(context, attrs);
mBitmap = null;
mPoints = null;
}
@null-product
null-product / MainActivity.java
Last active November 30, 2020 22:07
OpenCVでBitmapから四角形を抽出するサンプル
public class MainActivity extends AppCompatActivity {
static {
System.loadLibrary("opencv_java3");
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);