GithubHelp home page GithubHelp logo

jsfeat's People

Contributors

charleslaw avatar drojdjou avatar hitsthings avatar inspirit avatar literalpie avatar sminogue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsfeat's Issues

Trying to convert a static image to gray scale

Hello, I am trying to convert an jpg image from color to gray-scale using jsfeat, but all of the color is coming out to black. The following is the code I use.

var image_data=ctx.getImageData(0,0,default_width,default_height);
var image_data_proc= copyImageData(ctx,image_data);
var gray_img=new jsfeat.matrix_t(default_width,default_height,jsfeat.U8_t|jsfeat.C1_t);
jsfeat.imgproc.grayscale(image_data.data,gray_img.data);
var data_u32 = new Uint32Array(image_data.data);
var alpha = (0xff << 24);
var i = gray_img.cols*gray_img.rows, pix = 0;
while(--i >= 0) {
pix =gray_img.data[i];
data_u32[i] = alpha | (pix << 16) | (pix << 8) | pix;
}
ctxImProc.putImageData(image_data,0,0);

Does the library currently only support image from webcam ?
Or is this the "support for RGB/BGR order" that needs to be added ?

Thank you.

node js and jsfeat/cascades

I'm currently using jsfeat in the backend of my project with nodejs.
This is working great except for the loading of the cascades modules.
Could these modules also be made compatible, like jsfeat.js, with nodejs? (with module.exports)

Face recognition confidence

Hi, sorry for the issue, i am not understanding how to detect a face in a photo.
This is the code i am using http://pastebin.com/WrphXW1N

Actually it returns the Object with all the infos (confidence, x, y etc..), but how do i check if the data matches a face? Is the confidence value telling me if it's a face or not?

I took this piece of code from the clmtrackr library, which seems to use jsfeat.

Any help appreciated, thank you!

Building my own classifiers

I can't figure out how to include my own classifiers. I have made a XML file with haartraining(sources say that jsfeat needs classifier in "old" format) and converted it to js with haartojs script. It doesn't work when I include it. Which utility should I use for creating the right js files?

application

I am new to Computer Vision.

Could you share some code like how to detect hand open & hand fist, hand move close & far to webcam.

Or Could you recommend some books or websites about how to use these technology to implement above application ?

IE10 ArrayBuffer is undefined

Hi,
First, thanks for this great lib.

When i want to use your examples, IE10 tells me :
"Typed array constructor argument is invalid' at this line :
var data_u32 = new Uint32Array(imageData.data.buffer);

It happends everytime it uses the imageData.data.buffer.

In IE 10, imageData.data.buffer is undefined, in other browsers it's an ArrayBuffer {}

Is there a polyfill, or a solution to this issue ?

add DFT, IDFT, FFT, IFFT support

Please add DFT, IDFT, FFT, IFFT support.
Discrete Fourier Transform - needed
Fast Fourier Transform - very needed
Inverted Discrete Fourier Transform
Inverted Fast Fourier Transform
sample is DSP.js - but this not work with matrix(

No features detected in still image

Hi, this is probably not a bug but I wonder if you can help me with this.
Why do I not detect any features in a still image that's in an <img> tag on my html page?
I basically copied the fast_corners demo. Here's the core code:
http://pastebin.com/Pfx2Hqz9
Tried with the other feature detectors as well. Tried several threshold values down to 1. Tried with several jpg and png images. Checked that the array img_u8 does contain nonzero, nonconstant, data. Tried to do equalize_histogram before detect.
None of it helps. 0 is the output from fast_corners.detect.
Do you have any idea what I did wrong?

Eye Detection with JSFeat using pre recorded video stream

Hi!
We are trying to use Haar cascade eye detection classifier with jsfeat on pre-recorded video stream but we are not able to get it. We are currently using two libraries in our application. First one "JSOBJECT DETECT" is being used for face detection and once face is detected we want eye detection process to start working. For eye detection we are using JSFeat library. Can you please guide us how to integrate eye detection in grails application using pre recorded video stream? If you have any example that is already done before that, can you please share with us so that we can use that to solve our issue?

Thanks
Muhammad Ikram Ul Haq

Face detection on raw video but display canny edges to user

Firstly, thank you for this fantastic library, we have just started using it and it's very impressive!

We would like to run face detection on the feed coming from the user's camera but display a preview to the user generated from the canny edge detector. I see you have a use_canny option in your HAAR object detector demo but if I understand it correctly, it is doing the opposite of what we want and feeding the canny edges to the HAAR classifier and showing the original as the preview.

We tried running both the canny edge demo and the HAAR detector demo at the same time on the same page but the performance was terrible.

Do you have a recommendation for a good approach to displaying a canny preview to the user but doing face detection on the original video? Is there a way to pipeline these processes in an efficient way or should we be looking to run canny edges and face detection in parallel with web workers? From our initial experiments, it looks like the BBF face detection is more stable then HAAR so it would be good to try both in conjunction with canny.

Thanks for any advice you can give.

Create a release with version 0.0.8

Installing with bower causes an error when we specify the version in bower.json.
Please create a release so that we can install from bower.

Thank you

NodeJS support?

Should be as simple as

if (typeof module !== "undefined"){
  module.exports = jsfeat;
}

BBF Training

I'm interested in contributing some additional cascades for the BBF detection. Where did you get your face cascades from? I see there's some data sets in libccv

show canny image error

Hello, and thank you for developing this great library.
I am using jsFeat to apply Canny edge detection on an image, but I have trouble showing the image after the edge detector has been applied.
my code looks like this:

var play = document.getElementById('play');
var pause = document.getElementById('pause');
var videoControl = document.getElementById('video');

play.addEventListener('click', function(){
videoControl.play();
})

 pause.addEventListener('click', function(){
videoControl.pause();

var canvas2 = document.getElementById("canvas2");
var context = canvas2.getContext('2d');

var data_type = jsfeat.U8_t | jsfeat.C1_t;
var my_matrix = new jsfeat.matrix_t(800, 640, data_type);

jsfeat.imgproc.canny(videoControl, my_matrix, 100, 200);


context.drawImage(my_matrix,0,0,800, 640);
var data = context.getImageData(0,0,800, 640);
// console.log(data);
// console.log(my_matrix);

var img = document.getElementById("image");
img.src = canvas2.toDataURL();

})

The error I get is :

Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(HTMLImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap)'(anonymous function) @ js.js:21

I understand that my_matrix is not an Image() element, but is there any way to convert it to an acceptable format, so I can drawImage() and show it on a canvas?
Thank you.

data structure of Sobel and Scharr derivatives

I've been trying to draw the derivative back to the canvas and I can't quite figure out what sort of format it's in, or whether the derivative method takes into account the format of the destination array.

The size of the data returned from the sobel and scharr derivative functions seem to to be a square of the input. Or at least, it's difficult to determine what the output format is.

Any pointers that might help?

Hough Transforms?

Do you guys have any plans to implement Hough Transforms? Or is there another approach to doing line/shape detection (without training data like with haar classifiers) in jsfeat?

Thanks man, really excited to start using this, there's so much stuff in here!

video.videoWidth is still not available in FF when is used - 2 demos are broken

hi, in the two face detection demos (haar and bbf) the video.videoWidth and video.videoHeight are still 0 when demo_app() tries to use those values.

Working solution:

  1. remove the call of demo_app call from the setTimeout
  2. in the tick(), extend the main condition to this:
    if (video.readyState === video.HAVE_ENOUGH_DATA && video.videoWidth)
    and call the demo_app() once immediately after that condition

Your lib is awesome btw!

Web Workers and Canny Pruning

Just curious whether you've considered using web workers to offload detection to another process and if so, where do you stand on that :)

Also, are you going to add canny pruning to the viola jones object detection?

Non Webcam Examples

I think it would be useful if the demo site had some examples that use basic video or image files

Possibly if it detailed the entire flow from raw image files (jpg*), through filtering, and into the higher level functions.

Also detailing the return values.

Canny show edges on original image

Hi..
Any ideas how I can show the edges on the original image - say in RED.
after I run

jsfeat.imgproc.canny(img_u8, img_u8, options.low_threshold | 0, options.high_threshold | 0);

thx in advance!

Question : Creating cascaded for HAAR Cascades object detector

I am amazed by this library. My background is in computer vision and i would like to contribute to this library.

My first project would be something like creating tutorials for creating a cascade with opencv and then detect with it in web with this library.

Any ideas or pointers of anything that could be interesting to look at? (i am skilled in opencv and just need to get my head around the data structure in this library).

Maybe its something you already looked at.

QR Decomposition

I can see you're no longer active on this project so I would like to step in a bit and implement a QR alogirthm using Modified Gram-Schmidt alogithm. Are you wiling to accept my pull request if you happen to like my code?

coin recognition

my name is dwi nuryani rahmayanti and want to know about JSfeat more. actually i have a small project from my lecturer about implementing coin recognition using web application. can i use some library from JSFeat and implemented it in my case ? if yes, what library function that i should use in order to do that ? thanks for your attention before.

Not working on chrome after some time

I am checking on chrome latest version. when i run sample orb it is working fine after some time it is creating Aw! Snap error.. When i check on windows task manager it is utilizing the full memory. Can you help me to solve this.

Can't make jsfeat work at all

Could you put some working example? I have seen sample_grayscale.html, downloaded all files to local and it just does not work. Why?

example for handfist.js

Thanks for the awesome library .
Can you please add an example on how to use the handfist.js

Creating non video JSFeat examples and segmentation algorithms

Hi, I have created a JS editor which uses FabricJS and JSFeat for interactive computer vision. Currently I have only incorporated two algorithms (Canny and Yape). I have also incorporated two segmentation algorithms, it might be possible to port them to jsfeat.

You can find the demo and source code here
https://jsvisioneditor.appspot.com/
https://github.com/AKSHAYUBHAT/JSVisionEditor

Segmentation algorithms
https://github.com/kyamagu/js-segment-annotator

video freeze in HAAR detection

Thanks for this library.

Recently I noticed that in the HAAR (face) detection demo, the video freezes while running in Chrome. The FPS and HAAR detector times keep running (~50 fps, 16 ms), but the video appears frozen, typically within seconds. The BBF demo video freezes as well for me, although I haven't had much prior experience with that. The HAAR detection used to work fine for me months ago. Other demos (sobel, Fast Corners, YAPE included) run fine.

I have a version of jsfeat on my local machine that's at least months old, and worked fine, but now it also freezes. So my guess is the issue is with my browser or computer settings. My Chrome says it's up to date at 39.0.2171.95 m, though perhaps I should try a previous version.

Another odd behavior. If I change browser tabs, then change back, the video works again briefly before freezing again.

Support browsers without Float64Array

PhantomJS, often use for headless browser testing does not support Float64Array. Currently that makes jsfeat fail right away, as the type is used in construction of the data_t class.

However, it looks like major parts of jsfeat works without Float64Array, so it would be good if this was made optional.

Warp perspective for RGBA images

I see warp perspective is implemented only for grayscale images.
Is it hard to implement the same for standard color images?
Want to hear your opinion before digging into Java JAI or OpenCV code.
What was the reason why you implemented it for single channel source only?

TLD a.k.a predator algorithm

Awesome Library, thanks a lot!

I was just wondering if there are any plans on implementing the TLD (a.k.a. predator) algorithm?
There are several implementations floating around, notably OpenTLD and CCV ( http://libccv.org/doc/doc-tld/)
Since I used your optical flow with great succes, I would love to see jsfeat support tld as well.... Any chance?

Canny edge demo broken

Canny edge detection demo producing a javascript error and failing to run. Stack trace:

Uncaught ReferenceError: w0 is not defined jsfeat-min.js:1

a.canny jsfeat-min.js:1
tick

Error repeats itself every requestAnimationFrame tick.

Tested in Chrome 26.0.1410.65 stable

FaceRecognizer

Hi, does this library support opencv FaceRecognizer? Appreciate

Gaussian pyramid down supported by jsfeat?

Hello, how I can configure jsfeat to get "Gaussian pyramid down"?
Gaussian pyramid down supported by jsfeat?

jsfeat.imgproc.gaussian_blur(source:matrix_t, dest:matrix_t, kernel_size, sigma = 0);
jsfeat.imgproc.pyrdown(source:matrix_t, dest:matrix_t);

=-=-=-=-=-=-=-=
void org.opencv.imgproc.Imgproc.pyrDown(Mat src, Mat dst)
Blurs an image and downsamples it.
The function performs the downsampling step of the Gaussian pyramid construction. First, it convolves the source image with the kernel:
1/256 1 4 6 4 1 4 16 24 16 4 6 24 36 24 6 4 16 24 16 4 1 4 6 4 1
Then, it downsamples the image by rejecting even rows and columns.
=-=-=-=-=-=-=-=

int BLUR_LEVEL = 4;
for (int i = 0; i < BLUR_LEVEL; i++) {
    Imgproc.pyrDown(blurred, blurred);
}

=-=-=-=-=-=-=-=
but better will be for jsfeat:

    jsfeat.imgproc.pyrdown(source:matrix_t, dest:matrix_t, level);

Problem with examples

I was trying to check example with gray scale sampling. But it doesn't work in my browser.
In firefox there is blue screen (in browser). In chrome I got message:
WebRTC not available.

I'm on Ubuntu linux

asmjs

I am rather impressed with jsfeat! Have you considered rewriting portions in asm js?

None of the demos work

Every browser I try says "WebRTC not available" when trying any of the demos

I think there must be a bug somewhere.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.