Skip to content

Instantly share code, notes, and snippets.

View salmanhiro's full-sized avatar
🏀
Balling

Salman Chen salmanhiro

🏀
Balling
View GitHub Profile
@salmanhiro
salmanhiro / index.html
Created January 23, 2023 07:52
index.html on Streamlit file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width,initial-scale=1,shrink-to-fit=no"
/>
<link rel="shortcut icon" href="./favicon.png" />
<!-- Primary Meta Tags -->
@salmanhiro
salmanhiro / index.html
Created December 5, 2022 11:32
MediaPipe - Face Mesh
<div class="container">
<video class="input_video"></video>
<div class="canvas-container">
<canvas class="output_canvas" width="1280px" height="720px">
</canvas>
</div>
<div class="loading">
<div class="spinner"></div>
<div class="message">
Loading
@salmanhiro
salmanhiro / dilate.js
Created October 25, 2022 08:55
opencv.js sample code
const Jimp = require('jimp');
async function onRuntimeInitialized(){
// load local image file with jimp. It supports jpg, png, bmp, tiff and gif:
var jimpSrc = await Jimp.read('./lena.png');
// `jimpImage.bitmap` property has the decoded ImageData that we can use to create a cv:Mat
var src = cv.matFromImageData(jimpSrc.bitmap);
// following lines is copy&paste of opencv.js dilate tutorial:
let dst = new cv.Mat();
let M = cv.Mat.ones(5, 5, cv.CV_8U);
let anchor = new cv.Point(-1, -1);