Closed jywarren closed 3 years ago
I think this would do to get a Pi running:
var piImage = new Image();
$W.getCrossSection = function() {
$W.ctx.drawImage(piImage, 0, -$W.sample_start_row);
piImage.src = "http://pi.local/cam/cam_pic.php?time=" + new Date().getTime();
}
This could be seriously improved by getting the preview window working. But it'll do OK for starters. I think the images could be drawn to the <video>
element too... but all this is a follow-up issue, don't worry about this just yet.
OK, I've done a very minimal initial implementation here: https://github.com/publiclab/spectral-workbench.js/pull/57
This needs a good bit of work, but is successfully getting video from the webcam and graphing.
It still needs debugging, as well as better separation of basic UI from the integration with the parent server Rails code. Ideally the specific interface connections would be set up via a more standardized set of HTML elements with unique IDs, which would be bound to abstracted features of the capture code. Right now, it's all munged together!
But an initial step could be to comment out server-specific code and connect it up for us on the Raspberry Pi, and stand-alone in github pages.
We'll also want this code to produce data in the formats described in https://github.com/publiclab/spectral-workbench.js#usage
@jywarren I would like to initiate with this work. Can i reserve this project for GSOC 2019 ?
1.If yes then i will first solve some issues and discuss as what specific optimization can be done over it.
2.I have my own raspberry pi 3 and would love to implement it.
3.I have researched about this project and spent my whole day over it, but i am curious about how much accurate is the wavelength data that we are getting as per the graphical details ?
Instead we could use Convolution Neural Networks model which is using deep learning approach for accuracy (if you agree to it).
I am Microsoft Student Partner where i got subscription of Data Science and other courses where i want to use the knowledge of my recent course here.
4.The required data can be produced in a .csv
format or other based on the user requirement since it is going to be a standalone application we can provide such an option only after i implement the required approach.
5.So at first should i start making UI design and do some frontend for this repository and start pushing it over here.
6.I guess you have copied the required HTML
and Javascript
files.
7.Also i want to eradicate the use of upstream Ruby server and want to build it from scratch using Node.js
as backend and React.js
plus Material UI
as frontend.
8.At first the frontend will be deployed on github pages.
I need a green flag
from your side to get started before GSOC the frontend will be ready and will be deployed on github pages.
Hi @dhiraj240! Thanks for your interest! We don't really reserve projects, but you are very welcome to indicate this as the subject of your GSoC proposal, and that would be great!
I think there are some proposals for neural network or machine learning models, and i think there is some potential for this, but I think perhaps it makes sense for such ideas to be implemented in parallel as swap-in alternatives for existing features, such as the linear calibration we currently use. That way people could mix and match, and the substantial code that might go into such a model could be isolated from the main codebase in a modular way. But I like the idea - as do I like the idea of using machine learning to match spectra, or identify features, perhaps. I'd also recommend opening a separate issue for this and linking in related ideas from https://github.com/publiclab/spectral-workbench/issues/399, https://github.com/publiclab/plots2/issues/4660, and potentially some of the ideas from https://publiclab.org/notes/warren/01-02-2019/brainstorming-for-summer-of-code-2019 (where i recommend you leave a comment about your ideas if you haven't already!)
For the camera integration, yes, I've done a crude initial move of the code, but SpectralWorkbench.org is not running this capture code yet, and it'd require some cleanup and integration work to get it to be included over there. Worthwhile! And the most related to this issue topic.
For the Ruby server, I don't think we're likely to port the entire system, to tell the truth; the code is substantial enough that I would prefer to think about ways to move some more of the functionality into client-side javascript, while keeping the data storage in the back-end Ruby system. One thing that could be an important step towards shifting Ruby code into JS, however, would be to formalize, document, and write tests for the API that is required to provide data to the client-side code. Right now it's spread among a set of different calls that aren't very consistent and most do not have tests. Opening a separate issue for this kind of project, like standardize, document, and write tests for JavaScript API
on the parent Ruby project would be very welcome, and might also enable alternative clients to connect through the resulting standard APIs.
Thanks for your great energy!
Also interesting! https://github.com/publiclab/spectral-workbench.js/issues/75
Hmm. Things look more clearer to me.But right now i am confused as from where should i start ? Should i be working on connecting raspberry pi as suggested above.
I think the best course would be to start refactoring the capture code to follow a structure similar to the code in, say, publuclab/image-sequencer - something that gets built with browserify, and has tests, so we can get the under the surface stuff better organized and easier to read and maintain, then work on the integration parts. Does this make sense?
On Mon, Jan 28, 2019, 3:13 PM Dhiraj Sharma <notifications@github.com wrote:
Hmm. Things look more clearer to me.But right now i am confused as from where should i start ? Should i be working on connecting raspberry pi as suggested above.
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/spectral-workbench.js/issues/56#issuecomment-458240739, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ4_yI54O96JoO1Eu9bimkvrZkttKks5vHz2UgaJpZM4YckDW .
Okay, things seem clearer now !! i will start working over it.I had a long gap since i joined this organisation and now i got something to prove. Thank You Sir !! :smile:
Thank you too, and let's work on this in small pieces please, so that we can collaborate! There are others who join our weekly check ins that have done architectural work on breaking up and restructuring libraries, most recently in image sequencer. Say hello in the check in and see if others can offer some help!
On Mon, Jan 28, 2019, 3:32 PM Dhiraj Sharma <notifications@github.com wrote:
Okay, things seem clearer now !! i will start working over it.I had a long gap since i joined this organisation and now i got something to prove. Thank You Sir !! π
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/spectral-workbench.js/issues/56#issuecomment-458247760, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJzYw_WtI2t-Fgr9uzqJ5igCns76rks5vH0IQgaJpZM4YckDW .
See for example this one and ask @Mridul97 for input! https://github.com/publiclab/image-sequencer/pull/668
On Mon, Jan 28, 2019, 3:56 PM Jeffrey Warren <jeff@unterbahn.com wrote:
Thank you too, and let's work on this in small pieces please, so that we can collaborate! There are others who join our weekly check ins that have done architectural work on breaking up and restructuring libraries, most recently in image sequencer. Say hello in the check in and see if others can offer some help!
On Mon, Jan 28, 2019, 3:32 PM Dhiraj Sharma <notifications@github.com wrote:
Okay, things seem clearer now !! i will start working over it.I had a long gap since i joined this organisation and now i got something to prove. Thank You Sir !! π
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/spectral-workbench.js/issues/56#issuecomment-458247760, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJzYw_WtI2t-Fgr9uzqJ5igCns76rks5vH0IQgaJpZM4YckDW .
@jywarren I have started refracting the capture.js
code file. I will submit my PR by tomorrow, should i send the PR without getting assigned.
If not then assign this issue and #75 to me. After a hard time i configured my Pi. :smile:
oh good to hear it! Great!!! Good luck and looking forward to it!!!
On Sat, Feb 23, 2019 at 1:32 AM Dhiraj Sharma notifications@github.com wrote:
@jywarren https://github.com/jywarren I have started refracting the capture.js code file. I will submit my PR by tomorrow, should i send the PR without getting assigned. If not then assign this issue and #75 https://github.com/publiclab/spectral-workbench.js/issues/75 to me. After a hard time i configured my Pi. π
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/spectral-workbench.js/issues/56#issuecomment-466622147, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJxRdf-VoMUbm17SKsebwhxo6EOITks5vQOBKgaJpZM4YckDW .
@jywarren Have you completed the porting of the javascript part of SWB in #57 ?
No, i haven't!
Ok, just wanted to confirm. Thanks :slightly_smiling_face:
Hi @sidntrivedi012 just copying in helpful links from the Open Call!
spectralworkbench.org - spectralworkbench.org/capture
I believe this is largely complete in https://github.com/publiclab/spectral-workbench.js/pull/175 !!!
The live Capture interface is a great thing to bring into here -- https://spectralworkbench.org/capture
https://github.com/publiclab/spectral-workbench/blob/main/app/views/capture/_capture.html.erb and other files in that directory are the HTML portion.
The JavaScript is in https://github.com/publiclab/spectral-workbench/blob/main/app/assets/javascripts/capture.js
The first attempt, we can just copy that whole file over, and have it appear locally in
/src/
.We can consolidate the HTML files into a single static file in https://github.com/publiclab/spectral-workbench.js/tree/main/examples/capture.html and make sure it's pointed at capture.js, and add any necessary dependencies to our package.json file, installing them via
npm
.Once we get it all running, we can start doing some awesome things like getting it running on a Raspberry Pi! See this code for reference: https://github.com/publiclab/infragram/blob/f5f62ce483fbc88823de96f5c87d160228c0a764/pi/index.html#L189-L191
We'd love help with this one! A lot of moving parts, but a fun one :-)