Skip to content

Instantly share code, notes, and snippets.

@rom1dep
rom1dep / tttoe_scalafx.scala
Created April 4, 2018 18:30
In response to https://blog.plan99.net/reacts-tictactoe-tutorial-in-kotlin-javafx-715c75a947d2 which is a TicTacToe game written in Kotlin using JavaFX as the GUI library
import scalafx.application.JFXApp
import scalafx.application.JFXApp.PrimaryStage
import scalafx.beans.binding.Bindings
import scalafx.beans.property.ObjectProperty
import scalafx.collections.ObservableBuffer
import scalafx.scene.Scene
import scalafx.scene.control.{Button, Label}
import scalafx.scene.layout._
object Main extends JFXApp {
__author__ = 'rom1dep'
import cv2
from cv2 import imread, imshow, waitKey
import numpy as np
img = imread("piano.jpg")
(h, w, _) = img.shape
roi = img[160:180, :]