Skip to content

Instantly share code, notes, and snippets.

View maximgladkov's full-sized avatar

Maxim Gladkov maximgladkov

View GitHub Profile
<script type="text/javascript" src="http://blondie.lv/widget.js"></script>
<Response>
<Dial>37120087300</Dial>
</Response>
@maximgladkov
maximgladkov / test.xml
Created December 4, 2016 14:11
test.xml
<Response><Dial callerId="+37122322800"><Number>+37120087300</Number></Dial></Response>
cvmat = cvmat.GRAY2BGR
boxes.each do |box|
# Draw that bounding rectangle
# cvmat.rectangle! box.top_left, box.bottom_right, :color => OpenCV::CvColor::Red, :thickness => 2
points = box.min_area_rect2.points
cvmat.poly_line! [points], is_closed: true, color: OpenCV::CvColor::Red, :thickness => 2
end
#!/usr/bin/env ruby
require "opencv"
# ===================================================
#
# Processing:
# 1. Detect rotated rectangles
# 2. Determine max width
# 3. Determine either it is a line or rectangle