<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: fiveko</title>
    <description>The latest articles on DEV Community by fiveko (@fiveko).</description>
    <link>https://dev.to/fiveko</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F576887%2Fe479d5fa-0d16-4525-9ee4-eb659d505b8f.png</url>
      <title>DEV Community: fiveko</title>
      <link>https://dev.to/fiveko</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fiveko"/>
    <language>en</language>
    <item>
      <title>Client side Audio Editing</title>
      <dc:creator>fiveko</dc:creator>
      <pubDate>Wed, 22 Jun 2022 06:17:39 +0000</pubDate>
      <link>https://dev.to/fiveko/client-side-audio-editing-94k</link>
      <guid>https://dev.to/fiveko/client-side-audio-editing-94k</guid>
      <description>&lt;p&gt;Audio editing as an exciting topic that involve different knowledge and skills. Whether we are a professional musician or a regular user, sometimes we have to edit an audio file.&lt;br&gt;
There are various audio tools, but my personal focus is on online technology. In general, the &lt;a href="https://soundcmd.com/"&gt;online audio tool&lt;/a&gt; includes the following areas:&lt;/p&gt;

&lt;h2&gt;
  
  
  Digital signal processing
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Digital audio processing&lt;/strong&gt; is a sub-field of Digital signal processing. This an interesting topic that appears in life in various forms. The purpose of this process is to extract useful information from the signal. Some common applications are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Audio editors&lt;/li&gt;
&lt;li&gt;Voice recognition&lt;/li&gt;
&lt;li&gt;Text to speech&lt;/li&gt;
&lt;li&gt;Sound matching&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Like &lt;a href="https://fiveko.com/"&gt;digital image processing&lt;/a&gt;, sound processing involves mathematical transformations to analyze or modify the signal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Web technologies
&lt;/h2&gt;

&lt;p&gt;Unlike native apps, online software depends on available web technologies. Fortunately, modern web standards provide quite useful tools for manipulating and reproducing sound.&lt;/p&gt;

&lt;h3&gt;
  
  
  WebAssembly
&lt;/h3&gt;

&lt;p&gt;I put WebAssembly (&lt;em&gt;Wasm&lt;/em&gt;) first here because I'm a big fan of this technology. It allows all kind of &lt;strong&gt;software developers&lt;/strong&gt; to use the programming language that they love.&lt;br&gt;
I prefer to work with the &lt;a href="https://emscripten.org/"&gt;emscripten compiler tool chain&lt;/a&gt; and find it quite convenient for me.&lt;/p&gt;

&lt;h3&gt;
  
  
  Web Audio API
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Web Audio API&lt;/strong&gt; is an essential addition to the web standard. It gives ability to manage audio sources, apply sound filters, effects, decode media files and more.  &lt;/p&gt;

&lt;h3&gt;
  
  
  WebWorker
&lt;/h3&gt;

&lt;p&gt;Sometimes our web app has to do some hard work in parallel and keep the UI thread unlocked. In such cases we resort to a working thread, which we start from &lt;strong&gt;WebWorker&lt;/strong&gt;.&lt;br&gt;
One of the frequently mentioned shortcomings of the worker is the lack of DOM access. However, it has access to a large number of common objects such as WebSockets, IndexedDB, Network IO and so on.&lt;/p&gt;

&lt;h3&gt;
  
  
  AudioWorklet
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;AudioWorklet&lt;/strong&gt; is relatively new addition to the &lt;strong&gt;Web Audio API&lt;/strong&gt;. This tech gives ability to attach a custom JavaScript for audio processing. Like &lt;strong&gt;WebWorker&lt;/strong&gt;, it runs in a dedicated thread  to provide low latency during sound manipulation.&lt;br&gt;
&lt;strong&gt;Note:&lt;/strong&gt; &lt;em&gt;This feature works in secure context (HTTPS) on most / all browsers!&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  WebCodecs API
&lt;/h3&gt;

&lt;p&gt;The WebCodecs API is a recent extension of the web standard. As far as I know, it is currently supported by &lt;em&gt;Google Chrome&lt;/em&gt; and &lt;em&gt;Microsoft Edge&lt;/em&gt;, but not by &lt;em&gt;Mozilla Firefox&lt;/em&gt;.&lt;br&gt;
My experience with this technology is that it works well for video encoding in &lt;strong&gt;VP8&lt;/strong&gt; and &lt;strong&gt;VP9&lt;/strong&gt; and &lt;strong&gt;OPUS&lt;/strong&gt; for audio. Unfortunately, there is currently no build-in media muxer. This means that we have to use / write a separate component when we want to export WebM, MKV, MP4 or similar container. &lt;/p&gt;

&lt;p&gt;You may read the &lt;a href="https://web.dev/webcodecs/"&gt;Video Processing with WebCodecs article&lt;/a&gt; for deeper details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Audio editor for the Web
&lt;/h2&gt;

&lt;p&gt;There are different web applications for audio processing. However, I want to mention the &lt;strong&gt;Sound CMD&lt;/strong&gt;. This &lt;a href="https://soundcmd.com/"&gt;free online sound editor&lt;/a&gt; is still under development, but there are features that are of interest to me.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WJdsq0yE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hyjbkmwpisev01vflcl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WJdsq0yE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hyjbkmwpisev01vflcl.jpg" alt="Sound-CMD Spectrogram View" width="640" height="286"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi track support&lt;/strong&gt; - can open multiple files in separate tabs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spectrogram viewer, player and editor&lt;/strong&gt; - Can zoom into sound spectrum to listen (or edit) isolated frequency bands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sound generator&lt;/strong&gt; - generate signal with different amplitude, phase or shape&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Useful resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://webassembly.org/"&gt;WebAssembly portal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API"&gt;Web Audio API at MDN&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/AudioWorklet"&gt;AudioWorklet at MDN&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/WebCodecs_API"&gt;WebCodecs API at MDN&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://soundcmd.com/manual/"&gt;Sound CMD Help portal&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>webapp</category>
      <category>software</category>
      <category>audio</category>
    </item>
    <item>
      <title>Image edge detection for Web Apps</title>
      <dc:creator>fiveko</dc:creator>
      <pubDate>Wed, 10 Feb 2021 08:11:03 +0000</pubDate>
      <link>https://dev.to/fiveko/image-edge-detection-for-web-apps-471o</link>
      <guid>https://dev.to/fiveko/image-edge-detection-for-web-apps-471o</guid>
      <description>&lt;p&gt;Image edge detection is a fundamental part of many computer vision and image processing algorithms. The edges describe the shape of the objects and therefore they carry valuable information about the picture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b9nDO8gT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5fcifpavi9qmkjr4g1uz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b9nDO8gT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5fcifpavi9qmkjr4g1uz.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Popular edge detection techniques
&lt;/h2&gt;

&lt;p&gt;One of the most popular &lt;a href="https://fiveko.com/"&gt;algorithms for edge detection&lt;/a&gt; are the &lt;em&gt;gradient operators&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  First-order gradient operators
&lt;/h3&gt;

&lt;p&gt;Some of the most popular first-order gradient detection operators are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Prewitt operator&lt;/li&gt;
&lt;li&gt;Sobel operator&lt;/li&gt;
&lt;li&gt;Schaar operator&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Second-order operators
&lt;/h3&gt;

&lt;p&gt;The edge detectors from this group use the second-order derivative of image intensity. This means that they detect the rate of change in intensity, since the maximum of the gradient coincides with zero-crossing in the second derivative.&lt;br&gt;
Popular algorithms are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Laplacian of Gauss&lt;/li&gt;
&lt;li&gt;Difference of Gauss (DoG)&lt;/li&gt;
&lt;li&gt;Marr–Hildreth algorithm&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How to make edge detector for the web?
&lt;/h2&gt;

&lt;p&gt;Nowadays, it is possible to use modern web technologies to perform image analysis in a browser. The advanced &lt;a href="https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5"&gt;HTML5 standard&lt;/a&gt; is widely supported in most popular platforms and this provides many opportunities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Image filtering using CSS
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/filter"&gt;CSS filter&lt;/a&gt; property allows you to apply effects to images and various parts of HTML content such as borders and background.&lt;br&gt;
Unfortunately this is not much of an use for image analysis and machine vision.&lt;/p&gt;

&lt;h3&gt;
  
  
  Edge detection with HTML5 Canvas
&lt;/h3&gt;

&lt;p&gt;The HTML5 Canvas element is a powerful tool that provides access to raw image data. Due to this we can use vanilla JavaScript to manipulate and analyze images online.&lt;/p&gt;

&lt;h3&gt;
  
  
  Image analysis with WebGL
&lt;/h3&gt;

&lt;p&gt;WebGL (Web Graphics Library) is another web technology that enables high-performance image processing. The best part about it is that it works without plugins, so we can use the direct JavaScript API to manipulate pixel data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Online image processing apps
&lt;/h2&gt;

&lt;p&gt;If you are interested in image processing, you can see these &lt;a href="https://fiveko.com/online-tools/"&gt;online graphics apps&lt;/a&gt;. In addition to applications, this project offers free tutorials and image analysis algorithms.&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>webdev</category>
      <category>imageprocessing</category>
    </item>
  </channel>
</rss>
