Skip to content

Instantly share code, notes, and snippets.

View shimat's full-sized avatar
🍀
🍀

shimat shimat

🍀
🍀
View GitHub Profile
@shimat
shimat / main.py
Created January 11, 2024 23:11
pydeck 穴の実験
import pandas as pd
import pydeck
import streamlit as st
data = {
"lonlat_coordinates": [
[(141.6401120698, 43.1517769146), (141.6401207364, 43.1531326336), (141.6397759927, 43.1539184913), (141.6390831805, 43.1544711784), (141.627885327, 43.1579964438), (141.6223807824, 43.1611846664), (141.615577807, 43.160611499), (141.615818517, 43.1589753633), (141.6172281155, 43.155836929), (141.6171843101, 43.1544818661), (141.617995213, 43.1496458807), (141.6178229745, 43.1452420492), (141.6167072221, 43.1411407688), (141.6144123812, 43.1380268309), (141.6086826921, 43.1318113757), (141.603722173, 43.1303899593), (141.5978944064, 43.1294098293), (141.5938265307, 43.1281100948), (141.5887199254, 43.1253656326), (141.5859574555, 43.1235212847), (141.5832410594, 43.1211802676), (141.5922027984, 43.1219333968), (141.5959275348, 43.1217188688), (141.6144445542, 43.1172365733), (141.6232142084, 43.1136624137), (141.6271890257, 43.1112517314), (141.6338936486, 43.1062557444), (141.6367987741, 43.1045752596), (1
@shimat
shimat / S3ListObjects.cs
Created January 19, 2022 07:04
List objects in a S3 bucket
async IAsyncEnumerable<S3Object> EnumerateObjectsAsync(IAmazonS3 s3Client, string bucketName, string prefix)
{
var request = new ListObjectsV2Request
{
BucketName = bucketName,
Prefix = prefix,
Delimiter = "/",
};
ListObjectsV2Response response;
@shimat
shimat / buildInformation.txt
Created December 7, 2021 09:01
wasm cv::buildInformation
General configuration for OpenCV 4.5.3 =====================================
Version control: 58cca1b
Extra modules:
Location (extra): /home/runner/work/opencvsharp/opencvsharp/opencv_contrib-4.5.3/modules
Version control (extra): 58cca1b
Platform:
Timestamp: 2021-12-04T04:16:43Z
Host: Linux 5.4.0-1063-azure x86_64
@shimat
shimat / gist:f0c347dc7f463da8af08d1c2cdf88cc5
Created August 25, 2021 07:39
Cloud BuildでGoogle Container Registryにpush
gcloud builds submit --tag gcr.io/<project-name>/image-name:tag --project <project-name> --timeout 1h --machine-type E2_HIGHCPU_32
@shimat
shimat / mat_clone.cpp
Created August 7, 2021 04:05
OpenCV 空のMatに対するMat.cloneではdepthがセットされない
#include <iostream>
#include <opencv2/opencv.hpp>
int main()
{
{
cv::Mat src(0, 0, CV_32SC1);
auto dst = src.clone();
std::cout << "Mat" << std::endl
@shimat
shimat / KuwaharaFilter.cshtml.cs
Last active November 30, 2020 13:42
KuwaharaFilter with OpenCvSharp
using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using OpenCvSharp;
using WebApplication1.Models;
namespace WebApplication1.Pages
{
@shimat
shimat / AKAZEFeatures.cpp.diff
Last active August 15, 2018 01:24
diff AKAZEFeatures.cpp 3.2.0 <-> 3.3.0
diff --git a/modules/features2d/src/kaze/AKAZEFeatures.cpp b/modules/features2d/src/kaze/AKAZEFeatures.cpp
index 77a68a5..024a5ca 100644
--- a/modules/features2d/src/kaze/AKAZEFeatures.cpp
+++ b/modules/features2d/src/kaze/AKAZEFeatures.cpp
@@ -11,9 +11,14 @@
#include "fed.h"
#include "nldiffusion_functions.h"
#include "utils.h"
+#include "opencl_kernels_features2d.hpp"
@shimat
shimat / decolor.cpp
Created February 28, 2018 01:39
cv::decolor 細々した高速化版
// https://github.com/opencv/opencv/blob/master/modules/photo/src/contrast_preserve.cpp
// https://github.com/opencv/opencv/blob/master/modules/photo/src/contrast_preserve.hpp
// この2つを融合した状態
#include <opencv2/opencv.hpp>
#include <array>
using namespace std;
using namespace cv;
@shimat
shimat / MyDecoder.cs
Last active April 12, 2017 01:23
OpenCvSharp3のMatに、OpenCV2系でデコードした画像データをコピーする
using System;
using System.Runtime.InteropServices;
using OpenCvSharp; // OpenCvSharp3
static class MyDecoder
{
public static unsafe Mat FromImageDataByOpenCV2(
[NotNull] byte[] imageData,
ImreadModes modes = ImreadModes.Color)
{
#include <opencv2/opencv.hpp>
#include <cstdio>
#include <algorithm>
using Contour = std::vector<cv::Point>;
void extractBlueRegion(
const cv::Mat &src, cv::Mat &dst, uchar bLow, uchar bHigh)
{