So the idea of building such a project came from the fact that how ruthless we humans are in consuming the resources provided to us by nature. One such important resource is water.
Water is being wasted and polluted so much, that it is happening at a rate that we never imagined. So we decided to build a project which monitors the water consumption, the cleanliness of the water being thrown out, etc. and charges accordingly.
A very important thing to be noted here is that about water tampering which is a common problem across all over the world. With the implementation of blockchain on timely basis, we not only prevent people from unfair practices but also generate a credit distribution system to motivate them to take their steps in conservation of this precious resource and utilize them wisely.
And guess what?
It record all this data on a blockchain, so it never alters once recorded!
- Take input from the camera, set on the flow of the water.
- Analyze the flow rate of water in
square pixels/frame
and measure the volume consumed. - Accordingly measure the Performance Index, Flow Credits, etc.
- Record all these value onto the blockchain so it's immutable.
- Prevent any kind of tampering by water industries and monitor the water in efficient way and hence motivate them to follow the best practice and conserve water.
- Based on the consumption, the credit will be distributed to the consumers, which will motivate and help them consume the water resources in efficient and non-destructing manner.
- The main function of real world observation is implemented through OpenCV using a camera. In the given code, we have implemented our project using pre-recorded video but that can be easily altered by changing the statement: cam=cv2.VideoCapture("videoname.mp4") to cam=cv2.VideoCapture(0) #Or whatever external cam is being used
- A very simple blockchain protocol is being implemented in Python for simplicity and learning friendly approach.
WatertypeDetermination.py
=> A code to create histograms which then will help in colour comparision. Add the path for cropped images of fresh water and waste waterWaterClassifier.py
=> Necessary functions to execute water quality and flow rate.
blockchain.py
=> File to start mining blockblockchainv0.py
=> V0 ofblockchain.py
codetodetectflowrate.py
=> Press R to print selectedROI (while running the program) and some other variables code has all the explanation for the same
- Reading the real world data i.e. hardware -> software
- Writing the data to the blockchain accordingly by averaging out values.
- Attempting to implement the NEAR API in our project.
We're proud of the implementation that we did for writing the data from the hardware to the blockchain directly
- The major learning from this project we had, is the blockchain part. We learn how a blockchain can seamlessly integrate with the hardware and software as required.
Further we would like to add more features such as a administrative dashboard, cost calculation and improve the throughput calculation.