Bit of theoretical question. I'd like someone to explain me which colour space provides the best distances among similar looking colours? I am trying to make a humidity detection system using a normal RGB camera in dry fruits like almond and peanuts. I have tried RGB and HSV color space for EDA(please find the attachment). Currently I am unable to find a really big difference between the accepted and rejected model. It would be really a great help if someone can tell me what should I look for and also where. 
[![enter image description here](https://i.stack.imgur.com/A95Y2.png)](https://i.stack.imgur.com/A95Y2.png)
[![enter image description here](https://i.stack.imgur.com/aLcYV.png)](https://i.stack.imgur.com/aLcYV.png)
['https://Stackoverflow.com/questions/52647892', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/7554629/']
A `ValueEventListener` always gets a snapshot of the entire location you attach it to.

If you'd like to get a snapshot of the specific child, you should use a `ChildEventListener`.

```
ref.child("chat").child("branches").addChildEventListener(new ChildEventListener() {
  public void onChildAdded(DataSnapshot snapshot, String previousChildKey) {
    System.out.println(snapshot.getKey()+" was added after "+previousChildKey);
  }
  public void onChildChanged(DataSnapshot snapshot) {
    System.out.println(snapshot.getKey()+" was changed");
  }
  ...

```

When you first attach this listener, the `onChildAdded` method will be called for each branch. After that, if you make a change to a single branch, the `onChildChanged` method will be called for just that branch.
```
 ref.on("child_changed", function(snapshot) {
  var changedPost = snapshot.val();
  console.log("The updated post title is " + changedPost.title);
});

```

For more information you can **[click](https://firebase.google.com/docs/database/admin/retrieve-data#child-changed)** Here