Comments (11)
well i dont need this kind of data inside library. in the demos i use Array buffer casting for rendering results. so u just need to change it to smth that will work in IE10 to make result render work
from jsfeat.
Thanks for your answer.
Instead of :
var data_u32 = new Uint32Array(imageData.data.buffer);
I tried :
var data_u32 = new Uint32Array(W*H*4);
for(var a=0;a<imageData.data.length;a++){
data_u32[a]=imageData.data[a];
}
To get data, but the effect doesn't work, and i don't have any errors. Is there something wrong with this replacement ?
from jsfeat.
can u please tell me which example u are trying to run and where IE failing?
from jsfeat.
It's on IE10, with the sobel_derivatives example, for example ( I also use Canny edge detector and result is the same ). Given that I can't use webcam to test on IE, I use a picture send via an input and drawn on a canvas.
from jsfeat.
IE Returns so called CanvasPixelArray
instead of typed array. so u have to use with it channel-by-channel
// render result back to canvas
var data_u8 = imageData.data;
var i = img_u8.cols*img_u8.rows, pix=0, gx = 0, gy = 0;
while(--i >= 0) {
gx = Math.abs(img_gxgy.data[i<<1]>>2)&0xff;
gy = Math.abs(img_gxgy.data[(i<<1)+1]>>2)&0xff;
pix = ((gx + gy)>>1)&0xff;
data_u8[i*4+0] = gx; // RED
data_u8[i*4+1] = 0; // GREEN
data_u8[i*4+2] = gy; // BLUE
data_u8[i*4+3] = pix; // ALPHA
}
ctx.putImageData(imageData, 0, 0);
from jsfeat.
The image result is full white with this replacement.. I don't know what can I do to fix this. ..
from jsfeat.
and what if u dont process image but just get image data and then render it? do u actually load it and draw to context?
from jsfeat.
I draw the image, then i get the image data, then process different filters and i redraw the final result on the canvas.
from jsfeat.
what i am saying do u really get the image data before processing it with jsfeat?
what will happen if u just get image data and then set all pixels in it to RED and put it back to context. will u see all RED pixels?
from jsfeat.
Having the same issue here. Your approach does give me back
http://puu.sh/j2xlU/3718637a0a.png
instead of
http://puu.sh/j2xmT/c83dfb79f0.png
from jsfeat.
I used this code, tho:
// var alpha = (0xff << 24);
var data_u8 = imageData.data;
var i = img_u8.cols*img_u8.rows, pix=0, gx = 0, gy = 0;
while(--i >= 0) {
gx = Math.abs(img_u8.data[i<<1]>>2)&0xff;
gy = Math.abs(img_u8.data[(i<<1)+1]>>2)&0xff;
pix = ((gx + gy)>>1)&0xff;
data_u8[i*4+0] = gx; // RED
data_u8[i*4+1] = 0; // GREEN
data_u8[i*4+2] = gy; // BLUE
data_u8[i*4+3] = pix; // ALPHA
// pix = img_u8.data[i];
// data_u8[i] = alpha | (pix << 16) | (pix << 8) | pix;
}
because I couldnt figure out what img_gxgy
was
from jsfeat.
Related Issues (20)
- Execution time static image processing vs webcam example
- An error in the docs HOT 1
- Simpler examples HOT 3
- Dose it support React Native HOT 1
- Can i use jsfeat with react-native? HOT 1
- Uncaught ReferenceError: module is not defined HOT 4
- Support for iOS 11 HOT 3
- Adding more functionalities
- Help needed!!, ORB matching - How train pattern using image from image folder instead of webcam. HOT 3
- background removal from face portrait
- Tracking a soccer ball in video HOT 1
- Demos stopped working HOT 3
- Hi Mate! There is a 404 Problem with Ur online demo. HOT 1
- demo's don't work "WebRTC not available" HOT 2
- How to transform canvas getImageData() to single channel matrix?
- Natural feature tracking/matching (NFT) in videostream
- Any details of yape06, such as paper or blog
- Pull request guidelines HOT 2
- Canny edges coordinates
- jsfeat.point2d_t is not a constructor, jsfeat.js vs jsfeat-min.js
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsfeat.