Answers.Body: <p>Actually grayscaling and blurring are convolutional operations, and thresholding can be seen as an &quot;activation function&quot; (think of a sigmoid with a high gain). And resizing can be implemented by an <a href="https://keras.io/api/layers/pooling_layers/average_pooling2d/" rel="nofollow noreferrer">average pooling</a> layer. But since you have hard-coded these parameters (the blur radius and threshold), there is no ML involved.</p>
  <p>Then again it could be a fun exercise to apply a gradient descend to those layers. To run the training, you'd need to supplement the network with training data. In this case it would be a &quot;binary&quot; image where you have defined for each pixel whether it belongs to the background or foreground. Since there are so few parameters to tune, I expect that you wouldn't need that many training examples.</p>
  <blockquote>
  <p>if there are change between two frames according threshold value, then it will categorized as motion.</p>
  </blockquote>
  <p>Ah now that I read you question more carefully, your training data could be just yes/no label for the whole picture. You aren't looking for object segmentation.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-29T13:12:53.233Z
Answers.Text: You said I'm using convolutional operations, but CNN is type of neural network in Deep Learning, and Deep Learning is subset of Machine Learning. So does it mean I'm currently using CNN? If true, but you also said there is no ML involved.
Answers.UserDisplayName: Muhammad Ikhwan Perwira
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-29T13:23:52.013Z
Answers.Text: Well this is a bit of a gray area, but at least I'm confident that there is no supervised learning involved since you don't run any training against a labeled dataset. And there isn't unsupervised learning either, no any optimization steps or gradients so this isn't ML. You just use the same mathematical operations as CNN networks would use to solve the same problem.
Answers.UserDisplayName: NikoNyrh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-29T16:03:38.310Z
Answers.Text: @MuhammadIkhwanPerwira CNN is Convolutional *Neural Network*. You are using convolution, but you are not using a neural network.
Answers.UserDisplayName: Criticize SE actions means ban
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-29T16:37:23.847Z
Answers.Text: @user253751 it's clear now. One thing I still confused, is convolution operation is part of image processing or computer vision? I actually can't differentiate both term of them. I feel they are same.
Answers.UserDisplayName: Muhammad Ikhwan Perwira
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-29T16:42:35.507Z
Answers.Text: @MuhammadIkhwanPerwira why not both? There is no rule that says it can only be one or the other. I would say that image processing includes all the stuff you find in photoshop (like blur/unblur/zoom/swirl), while computer vision is trying to make computers see things by themselves (where is the face? how many cars are there?)
Answers.UserDisplayName: Criticize SE actions means ban
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-30T18:18:53.087Z
Answers.Text: @user253751 okay so we can conclude that Computer Vision is always related to Image Processing.
Answers.UserDisplayName: Muhammad Ikhwan Perwira
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-30T18:19:27.563Z
Answers.Text: @MuhammadIkhwanPerwira Yes. It's impossible make computers see without processing images. You can also draw things in photoshop, and that is image processing, but not computer vision.
Answers.UserDisplayName: Criticize SE actions means ban
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-29T12:37:17.940Z
Answers.LastActivityDate: 2022-09-29T12:37:17.940Z
Answers.UserDisplayName: NikoNyrh
Answers.Body: <p>No - not all computer vision is machine learning.</p>
  <p>With machine learning, the computer designs its own algorithm (often by gradient descent) based on a &quot;blank slate&quot; version of the algorithm.</p>
  <p>Since you have just told the computer an algorithm, it's not machine learning.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-28T20:53:59.733Z
Answers.Text: Also, is my project related to CNN since CNN was subset of Deep Learning and it was subset of ML too?
Answers.UserDisplayName: Muhammad Ikhwan Perwira
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-28T21:00:22.827Z
Answers.Text: @MuhammadIkhwanPerwira A CNN is a type of neural network. You're not using any neural network.
Answers.UserDisplayName: Criticize SE actions means ban
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-28T20:43:33.633Z
Answers.LastActivityDate: 2022-09-28T20:43:33.633Z
Answers.UserDisplayName: Criticize SE actions means ban
Body: <p>So I have AI project about <code>motion detection</code> with image subtraction.</p>
  <p>Regardless what are the object used, if there are change between two frames according threshold value, then it will categorized as motion.</p>
  <p>So in my project I only use <code>OpenCV</code> library in python.</p>
  <p>My program take two input. Where first frame or background frame will assumed/labeled as no motion frame for a refference. Second frame is any frame that captured currently.</p>
  <p>So, with just using image processing like</p>
  <pre><code>resizing -&gt; grayscaling -&gt; blurring -&gt; substracting (absdiff) -&gt; thresholding
  </code></pre>
  <p>Basically my program/project is just comparing between two images if there are changes in its pixel.</p>
  <p>Beside my project is related to computer vision obviously, is my project related to machine learning too? Especifically <code>supervised learning</code> because I labelled what is no motion image looks like to the machine.</p>
  <p>But in other hand, I don't feel any statistically method where machine learning usually use it. My mathematical operation was using substracting method only.</p>
  
Tags: <machine-learning><computer-vision><ai-design>
Title: Is Computer Vision always related to Machine Learning?
UserDisplayName: Muhammad Ikhwan Perwira
ThreadText: # Is Computer Vision always related to Machine Learning?
  
  (Asked by: username_0 on 2022-09-28)
  
  So I have AI project about motion detection with image subtraction.
  Regardless what are the object used, if there are change between two frames according threshold value, then it will categorized as motion.
  So in my project I only use OpenCV library in python.
  My program take two input. Where first frame or background frame will assumed/labeled as no motion frame for a refference. Second frame is any frame that captured currently.
  So, with just using image processing like
  resizing -> grayscaling -> blurring -> substracting (absdiff) -> thresholding
  
  Basically my program/project is just comparing between two images if there are changes in its pixel.
  Beside my project is related to computer vision obviously, is my project related to machine learning too? Especifically supervised learning because I labelled what is no motion image looks like to the machine.
  But in other hand, I don't feel any statistically method where machine learning usually use it. My mathematical operation was using substracting method only.
  
  **Tags:** machine-learning, computer-vision, ai-design
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2022-09-28. Score: 3 | Accepted answer
  
  No - not all computer vision is machine learning.
  
  With machine learning, the computer designs its own algorithm (often by gradient descent) based on a "blank slate" version of the algorithm.
  
  Since you have just told the computer an algorithm, it's not machine learning.
  
  > **Comments:**
  > **username_0**: Also, is my project related to CNN since CNN was subset of Deep Learning and it was subset of ML too?  
  > **username_2**: @MuhammadIkhwanPerwira A CNN is a type of neural network. You're not using any neural network.  
  
  ---
  
  ### Answer by username_1 on 2022-09-29. Score: 1
  
  Actually grayscaling and blurring are convolutional operations, and thresholding can be seen as an "activation function" (think of a sigmoid with a high gain). And resizing can be implemented by an [average pooling](https://keras.io/api/layers/pooling_layers/average_pooling2d/) layer. But since you have hard-coded these parameters (the blur radius and threshold), there is no ML involved.
  
  Then again it could be a fun exercise to apply a gradient descend to those layers. To run the training, you'd need to supplement the network with training data. In this case it would be a "binary" image where you have defined for each pixel whether it belongs to the background or foreground. Since there are so few parameters to tune, I expect that you wouldn't need that many training examples.
  
  > if there are change between two frames according threshold value, then it will categorized as motion.
  
  Ah now that I read you question more carefully, your training data could be just yes/no label for the whole picture. You aren't looking for object segmentation.
  
  > **Comments:**
  > **username_0**: You said I'm using convolutional operations, but CNN is type of neural network in Deep Learning, and Deep Learning is subset of Machine Learning. So does it mean I'm currently using CNN? If true, but you also said there is no ML involved.  
  > **username_1**: Well this is a bit of a gray area, but at least I'm confident that there is no supervised learning involved since you don't run any training against a labeled dataset. And there isn't unsupervised learning either, no any optimization steps or gradients so this isn't ML. You just use the same mathematical operations as CNN networks would use to solve the same problem.  
  > **username_2**: @MuhammadIkhwanPerwira CNN is Convolutional *Neural Network*. You are using convolution, but you are not using a neural network.  
  > **username_0**: @user253751 it's clear now. One thing I still confused, is convolution operation is part of image processing or computer vision? I actually can't differentiate both term of them. I feel they are same.  
  > **username_2**: @MuhammadIkhwanPerwira why not both? There is no rule that says it can only be one or the other. I would say that image processing includes all the stuff you find in photoshop (like blur/unblur/zoom/swirl), while computer vision is trying to make computers see things by themselves (where is the face? how many cars are there?)  
  > **username_0**: @user253751 okay so we can conclude that Computer Vision is always related to Image Processing.  
  > **username_2**: @MuhammadIkhwanPerwira Yes. It's impossible make computers see without processing images. You can also draw things in photoshop, and that is image processing, but not computer vision.  
  
  ---
  
  