<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>emre şahin's digital garden 🍃 - computer vision</title>
    <link>https://emresahin.net/tags/computer-vision/</link>
    <description>Posts in the computer vision tag</description>
    <language>en</language>
    <managingEditor>contact@emresahin.net (Emre Şahin)</managingEditor>
    <lastBuildDate>Tue, 15 Sep 2026 19:46:32 +0000</lastBuildDate>
    <atom:link href="https://emresahin.net/tags/computer-vision/rss.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>Numpy ValueError while using dlib's face detector</title>
      <published>2018-10-24T21:41:18+00:00</published>
      <updated>2018-10-24T21:41:18+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Wed, 24 Oct 2018 21:41:18 +0000</pubDate>
      <link>https://emresahin.net/value-error-dlib-14346-27722/</link>
      <guid isPermaLink="true">https://emresahin.net/value-error-dlib-14346-27722/</guid>
      <description>For two days, I was trying to find a bug in my code because an assertion in the code that uses numpy.max was throwing an error: ValueError: zero-size array to reduction operation maximum which has no identity , which didn’t seem reasonable. I’m building a face recognizer with dlib ’s frontal face...</description>
      <category>Machine Learning</category>
      <category>Python</category>
      <category>Debugging</category>
      <category>dlib</category>
      <category>NumPy</category>
      <category>Face Detection</category>
      <category>Python</category>
      <category>Computer Vision</category>
      <category>ValueError</category>
      <content:encoded><![CDATA[<p>For two days, I was trying to find a bug in my code because an assertion in the
code that uses <code>numpy.max</code> was throwing an error: <code>ValueError: zero-size array to reduction operation maximum which has no identity</code>, which didn’t seem
reasonable.</p>
<p>I’m building a face recognizer with <a href="https://github.com/davisking/dlib/">dlib</a>’s
frontal face detector, and today, I noticed that some of the results return
<em>negative</em> coordinates in face detection. This means the detected face is
partial, although it’s a bit of a stretch to use negative coordinates for this.</p>
<p>My code wasn’t checking for negative coordinates and was building the NumPy
array incorrectly. However, after reading <a href="https://github.com/davisking/dlib/issues/767">the
issue</a>, although I’m still not convinced
that it’s a good approach, I added a few <code>if</code> statements and the problem was solved.</p>]]></content:encoded>
    </item>
    <item>
      <title>Visual Transliteration for Ottoman</title>
      <published>2013-08-01T21:00:00+00:00</published>
      <updated>2013-08-01T21:00:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Thu, 01 Aug 2013 21:00:00 +0000</pubDate>
      <link>https://emresahin.net/visual-encoding-for-ottoman/</link>
      <guid isPermaLink="true">https://emresahin.net/visual-encoding-for-ottoman/</guid>
      <description>There are already various transliteration systems for Arabic-based scripts to represent them in the Roman alphabet. However, all of them aim to represent phonemes in transliteration, without paying attention to distinct visual elements. When we are manually transcribing these texts, the method is...</description>
      <category>Ottoman</category>
      <category>Digital Humanities</category>
      <category>Ottoman Turkish</category>
      <category>Transliteration</category>
      <category>Visual Encoding</category>
      <category>Computer Vision</category>
      <category>Arabic Script</category>
      <content:encoded><![CDATA[<p>There are already various transliteration systems for Arabic-based
scripts to represent them in the Roman alphabet. However, all of them aim to represent
<em>phonemes</em> in transliteration, without paying attention to distinct
visual elements. When we are manually transcribing these texts, the
method is fine. However, when we try to represent visual elements in
scanned handwritten documents, we face some problems regarding these
transliteration systems.</p>
<p>Since conventional systems aim to represent phonemes, a correct
<em>reading</em> is necessary and this requires expertise in the language being represented.
For Ottoman, this is a deeper problem since the writing system
is not actively used.</p>
<p>Labels should correspond to classes in the classification of visual
elements. For example, in some cases we label ى, ي and ـيـ identically
as <em>y</em> but their visual features are distinct from each other. In other
cases, an identical letter is coded as <em>y</em>, <em>e</em> or <em>i</em> albeit
represented identically in visual terms, because of their difference in
reading. This makes visual classes mixed and fuzzy, and any measurement of
performance gives little clue about the effectiveness of features or
classifiers.</p>
<p>Here we document a new transliteration system for visual items in
Ottoman Turkish. In this work, our aim is to provide a simple visual
approach to transliteration and then devise necessary conversion tables
into phonetic transliteration or transcription systems.</p>
<p>Except for numerals, words in Arabic-based writing systems are composed of
items in two categories. The first category is a large letter group
composed of a continuous movement of the pen, like کلمه. The other category
is the smaller elements like dots and diacritics found around these
larger items.</p>
<p>A visual transliteration should represent distinct visual elements
differently. In order to keep simplicity in labeling and application,
<em>dotless</em> letters will be used as <em>base letters</em> and the other letters
will be written in terms of these dotless items.</p>
<p>A full letter code is composed of one <em>base letter</em> code and an
optional set of diacritic codes. The base letter code is a small Roman
letter. The diacritic codes have two parts: the first part is one of
<code>o</code>, <code>u</code> or <code>i</code>, which mean <em>over</em>, <em>under</em> or <em>ligature</em> respectively.
The second part of the diacritic code shows the type of diacritics and is a
string of digits or letters. A full letter code conforms to the following
regular expression:
<code>[a-h,j-n,p-t,v-z](([ou][0-9]+)|(i[a-h,j-n,p-t,v-z]))*</code></p>
<p>The letters <code>o</code>, <code>u</code> and <code>i</code> are not used as base letter codes, so there
is no ambiguity in parsing the elements.</p>
<p>The tables for all visual elements can be found in Tables
tab:baseletters, tab:diacritics and tab:numerals.</p>
<hr>
<p>Letter Shape Transliteration Used in Letters</p>
<hr>
<p>ا e ا</p>
<p>ٮ b ب, ت, ث, ن, پ, یـ</p>
<p>ح x ح, خ, ج, چ</p>
<p>د d د, ذ</p>
<p>ر r ر, ز</p>
<p>س s س, ش</p>
<p>ص z ص, ض</p>
<p>ط t ط, ظ</p>
<p>ع a ع, غ</p>
<p>ٯ f ف, ق</p>
<p>ک k ک, گ</p>
<p>ل l ل, ك</p>
<p>م m م</p>
<p>و w و</p>
<p>ه h ه, ة</p>
<p>ی y ی</p>
<p>ﺀ c ﺀ</p>
<hr>
<p>Table: The Transliterations of Base Letters</p>
<hr>
<p>Transliteration Description</p>
<hr>
<p>1 Dot of ب, ن or خ</p>
<p>2 Dots of ق, ت or یـ</p>
<p>3 Dots of ث, ش or چ</p>
<p>5 ء <em>hamza</em> and also in ك</p>
<p>8 ـّ <em>shadda</em></p>
<p>0 ـْ <em>sukun</em></p>
<p>6 ـٓ <em>madda</em></p>
<p>7 / sign above گ</p>
<p>4 ـَ <em>fatha</em> and ـِ <em>kasra</em></p>
<p>9 ـُ <em>damma</em></p>
<p>44 ـً <em>fathatan</em> and ـٍ <em>kasratan</em></p>
<p>99 ـٌ <em>dammatan</em></p>
<hr>
<p>Table: Transliterations for Diacritics</p>
<hr>
<p>Description Transliteration</p>
<p>۱ n1</p>
<p>۲ n2</p>
<p>۳ n3</p>
<p>۴ n4</p>
<p>۵ n5</p>
<p>۶ n6</p>
<p>۷ n7</p>
<p>۸ n8</p>
<p>۹ n9</p>
<p>۰ n0</p>
<hr>
<p>Table: Transliterations for Numerals</p>
<p>The advantages of using this transliteration instead of a phonetic
transliteration can be summarized as follows:</p>
<p>Representing visual elements in a phonetic way is not an optimal
representation for Computer Vision research. The information from the
phonetic representation slips into visual information which results in
classes that bear no direct connection with visual features. In turn,
these classes become harder to classify and understand.</p>
<p>The transliteration system described in this paper does not need
expertise in the language. Anyone who recognizes the letters should be
able to transliterate word images.</p>
<p>It is possible to denote single elements which do not represent a
sound in the language with visual transliteration. No transliteration
system for Arabic and similar languages represents diacritics as in Table
tab:diacritics. This is important for Computer Vision, since these items
are as legitimate visual elements on a paper as others. Without
independent representation, these items would have to be represented <em>along</em>
with others, and their classification could not be done independently.</p>
<p>The system is much more flexible than a phonetic transliteration system.
It allows for the development of new letter signs by combining existing diacritics
with base letters. For example, ﭪ is a letter not found in historical
documents, but can be seen in modern Arabic to represent the <em>v</em> sound.
Although not thought of beforehand, this can be represented as <strong>fo3</strong> in
the system we describe. There are also writing variations, for example,
in Maghribi (Western) Arabic, the letter ف is written as ڢ but is
phonetically identical. In a phonetic transliteration this difference is
lost, but the visual transliteration is able to represent the usual case
with <strong>fo1</strong> and the specific case with <strong>fu1</strong>.</p>
<p>It is common in handwriting to attribute diacritics of one letter to
another. For example, three dots in the middle of سر may be read as شر or
سژ. In a phonetic transliteration system, the first might be represented
as <strong>şr</strong> and the second as <strong>sj</strong>. This leads to complexity in describing such
middle cases. In a visual transliteration system, these two
are represented as <strong>so3r</strong> and <strong>sro3</strong>, in which we are able to write
rules that exchange <strong>o3</strong> between neighboring letters and decide for the
best reading in later stages.</p>
<p>In handwriting and print, diacritics are especially written loosely. For
example, three dots above ث are written as three separate dots in print,
but usually contracted as a single shape in handwriting. For the print
case, we can have <strong>so1o1o1</strong> denoting three dots separately while for
the handwriting case <strong>so3</strong> is used and in an upper level, the former
is converted to the latter by a rule specifying <em>three separate dots
mean a single three dot</em>.</p>
<p>Table tab:ottoman-letters shows all letters of the Ottoman alphabet.</p>
<hr>
<p>**Ottoman **Transliteration** <strong>Ottoman <strong>Transliteration</strong>
Letter</strong> Letter** \\</p>
<hr>
<p>ا e اَ eo4</p>
<p>اِ eu4 اُ eo9</p>
<p>أ eo5 إ eu5</p>
<p>آ eo6 ب bu1</p>
<p>پ bu3 ت bo2</p>
<p>ث bo3 ج xu1</p>
<p>چ xu3 ح x</p>
<p>خ xo1 د d</p>
<p>ذ do1 ر r</p>
<p>ز ro1 ژ ro3</p>
<p>س s ش so3</p>
<p>ص z ض zo1</p>
<p>ط t ظ to1</p>
<p>ع a غ ao1</p>
<p>ف fo1 ق fo2</p>
<p>ك lo5 گ ko7</p>
<p>ل l م m</p>
<p>ن bo1 ڭ lo5o3</p>
<p>ه h و w</p>
<p>ی y ـیـ bu2</p>
<p>لا lie ک k</p>
<hr>
<p>Table: Ottoman Letters and Transliterations</p>]]></content:encoded>
    </item>
    <item>
      <title>A Fast Local Descriptor for Dense Matching</title>
      <published>2012-07-19T14:00:00+00:00</published>
      <updated>2012-07-19T14:00:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Thu, 19 Jul 2012 14:00:00 +0000</pubDate>
      <link>https://emresahin.net/12057-21-1773/</link>
      <guid isPermaLink="true">https://emresahin.net/12057-21-1773/</guid>
      <description>Authors: Engin Tola, Vincent Lepetit, Pascal Fua Keywords: Stereo image descriptor circle quantization formalization binary mask Depth estimation Q1: How is depth estimation related to object recognition? Objects are located in a 3D environment, and in order to recognize them correctly, we need t...</description>
      <category>Computer Vision</category>
      <category>Paper Reviews</category>
      <category>DAISY</category>
      <category>descriptor</category>
      <category>dense matching</category>
      <category>computer vision</category>
      <category>paper review</category>
      <content:encoded><![CDATA[<h1 id="authors-engin-tola-vincent-lepetit-pascal-fua">Authors: Engin Tola, Vincent Lepetit, Pascal Fua</h1>
<h1 id="keywords">Keywords:</h1>
<ul>
<li>Stereo image</li>
<li>descriptor</li>
<li>circle</li>
<li>quantization</li>
<li>formalization</li>
<li>binary mask</li>
<li>Depth estimation</li>
</ul>
<h1 id="q1-how-is-depth-estimation-related-to-object-recognition">Q1: How is depth estimation related to object recognition?</h1>
<p>Objects are located in a 3D environment, and in order to recognize them
correctly, we need to be able to recreate their layout in a scene. With
such an aid, we can successfully determine the object boundaries.</p>
<h1 id="q2-what-does-the-descriptor-contain">Q2: What does the descriptor contain?</h1>
<p>It is a concatenation of vectors. The first vector is the Gaussian of
the center point with a $\Sigma_0$, the second set of vectors are
circles lying on circle $R_1$, the third set of vectors are circles
lying on circle $R_2$… Each vector contains orientation maps after a
Gaussian convolution.</p>
<h1 id="q3-on-which-datasets-did-the-authors-try-the-technique">Q3: On which datasets did the authors try the technique?</h1>
<p>As far as I can tell, it is a custom dataset that contains the view of
the same scene from many perspectives.</p>
<h1 id="q4-what-is-the-salience-criterion-for-keypoints">Q4: What is the salience criterion for keypoints?</h1>
<p>The aim of the technique is not matching these keypoints to each other
by selecting the most appropriate ones. The computation is done on <em>all</em>
pixels/keypoints. Hence, no criterion for keypoint filtering is reported.</p>]]></content:encoded>
    </item>
    <item>
      <title>Paper Review: FREAK: Fast Retina Keypoint</title>
      <published>2012-07-16T15:51:00+00:00</published>
      <updated>2012-07-16T15:51:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Mon, 16 Jul 2012 15:51:00 +0000</pubDate>
      <link>https://emresahin.net/12055-0-861/</link>
      <guid isPermaLink="true">https://emresahin.net/12055-0-861/</guid>
      <description>URL: http://www.ivpe.com/papers/freak.pdf Authors: Alexandre Alahi, Raphael Ortiz, Pierre Vandergheynst Keywords: Keypoint Binary descriptor Retina Sampling Saccadic Coarse-to-fine Orientation Q1: What is the formula for the retina pattern? The one difference from BRISK is that the pattern has ov...</description>
      <category>Computer Vision</category>
      <category>Paper Reviews</category>
      <category>FREAK</category>
      <category>binary descriptor</category>
      <category>keypoint</category>
      <category>sampling</category>
      <category>computer vision</category>
      <category>paper review</category>
      <content:encoded><![CDATA[<p>URL: http://www.ivpe.com/papers/freak.pdf</p>
<h1 id="authors-alexandre-alahi-raphael-ortiz-pierre-vandergheynst">Authors: Alexandre Alahi, Raphael Ortiz, Pierre Vandergheynst</h1>
<h1 id="keywords">Keywords:</h1>
<ul>
<li>Keypoint</li>
<li>Binary descriptor</li>
<li>Retina</li>
<li>Sampling</li>
<li>Saccadic</li>
<li>Coarse-to-fine</li>
<li>Orientation</li>
</ul>
<h1 id="q1-what-is-the-formula-for-the-retina-pattern">Q1: What is the formula for the <em>retina</em> pattern?</h1>
<p>The one difference from BRISK is that the pattern has overlapping circles. In
BRISK, they were tangential. <em>Redundancy increases recognition</em>.</p>
<p>The circles are log-polar. In this case, it is similar to Shape Context
descriptors, but we do not divide into regions; we create increasingly
larger circles on polar lines.</p>
<h1 id="q2-what-do-the-descriptors-contain">Q2: What do the descriptors contain?</h1>
<p>A binary descriptor is a string of bits. A bit corresponds to a pair of
receptive fields. If the intensity of the first receptive field is <em>larger</em>
than the second, the bit is set to 1; otherwise, it is zero.</p>
<h1 id="q3-how-does-the-sampling-work">Q3: How does the sampling work?</h1>
<p>Each circle in the pattern is called a receptive field. A Gaussian kernel is
applied to these fields, and their intensities are calculated.</p>
<h1 id="q4-is-there-scale-invariance-how">Q4: Is there scale invariance? How?</h1>
<p>There is no discussion of scale invariance, but scale invariance seems
to arise from the building of the descriptor. Since the circles are
created in log-polar orbits and bits are put into the descriptor according
to their contribution to recognition, scale invariance follows these.</p>
<h1 id="q5-how-is-rotation-invariance-achieved">Q5: How is rotation invariance achieved?</h1>
<p>Orientation is calculated using 45 symmetric pairs from the center. It
has larger steps than those of BRISK and thus needs lower memory.</p>]]></content:encoded>
    </item>
  </channel>
</rss>
