Questions tagged [imagedata]

The ImageData browser interface/API allows JavaScript to directly access pixel data in a <canvas> element. The data is represented as a one-dimensional array with RGBa values stored in separate indices.

65 questions
0
votes
1 answer

Different ArrayBuffer for the same image (Creating ImageData in Worker problem)

I'm trying to create ImageData inside the Worker by only posting the message to it with the image URL, width, and height. To make it work I need to fetch the image and get ArrayBuffer. With that I should be able to create new…
0
votes
0 answers

Increase accuracy of CNN model

I have been working on image classification problem. I have used ImageDataGenerator to load and preprocess data and then train my CNN model on image data set but the accuracy is stuck to 51%. I have tried using: My data set is of 1000 signatures…
0
votes
0 answers

Canvas looking stretched when modifying ImageData

I'm trying to port one of my Processing projects (see Github page for the project) into vanilla Javascript but I'm having issues "transplanting" the data from one ImageData object into another ImageData object. I can fill an area of the canvas with…
0
votes
1 answer

Undersampling with image data in python

main idea of undersampling is randomly delete the class which has sufficient observations so that the comparative ratio of two classes is significant in our data. So, how to undersampling with image data in python? please help me:( I took the…
hilyap
  • 1
  • 2
0
votes
1 answer

Generate horizontal sprite image from array of ImageData

I'm trying to build one horizontal transparent image from array of ImageData, which will be used as sprite image for animation. Can you please explain, how can I pass frames to canvas, which is wider ( width X countFrames) and how can I move for…
gedrihoydo
  • 11
  • 1
  • 2
0
votes
1 answer

Passing ImageData from One View Controller to Another

Hello I have ran into this situation before. I have image data that I want to pass from one view controller to another and display that data in an image view. In viewdidload in the 2nd VC, the data is printed properly but when I try to insert that…
0
votes
1 answer

Can't get the pixels from ImageData object

I'm trying to extract pixels from an image using a canvas element and the ImageData class, but with little to no success. My code is: var image = new Image(); image.src = ""; var context =…
memememe
  • 663
  • 6
  • 21
0
votes
0 answers

Fastest AWS DB service for large media nested metadata querying

I'm trying to determine what might be the best suited (mainly in terms of speed) database service for querying metadata of media content such as images/videos/audio located on AWS S3. Currently I'm looking at DynamoDB and Redshift, but there may be…
Austin
  • 6,921
  • 12
  • 73
  • 138
0
votes
1 answer

Javascript Canvas get data from image and display it

I've no idea why this doesn't work. The src attribute of the image is changed with the new data, but the image is not actually visible. I tried with several different images. It's just javascript in a browser and Jquery is required.
Hasen
  • 11,710
  • 23
  • 77
  • 135
0
votes
1 answer

PutImageData() not drawing ImageData

I want to make a fractal generator that uses this method: https://www.johndcook.com/blog/2017/07/08/the-chaos-game-and-the-sierpinski-triangle/ It's really interesting and I wanted to try it on squares and pentagons etc. The result of the Code below…
0
votes
1 answer

how to process data generated by ImageDataGenerator?

I am trying to use Keras ImageDataGenerator to train my model with a large stereo Dataset. For each scene, I have two rgb images, I have to split them and concatenate them to have 6 one-channel images as an input of my model (i.e. this shape…
E.gh
  • 85
  • 2
  • 11
0
votes
2 answers

React/Node Trouble sending ImageData to server

I have a problem where i have some issues to send canvas's imageData to my server to process it. Here's my react/redux action to send data: export const edit = (e) => dispatch => { let payload = store.getState().image.imageData payload =…
Halt
  • 97
  • 1
  • 8
0
votes
2 answers

Import multiple Images

I want to duplicate my pictures with this code: from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img datagen = ImageDataGenerator( rotation_range=40, width_shift_range=0.2, …
Timothy_Goodman
  • 393
  • 1
  • 5
  • 18
0
votes
1 answer

Animating with the `ImageData` data array causes very unexpected and glitch-like results

I recently stretched a gradient across the canvas using the ImageData data array; ie the ctx.getImageData() and ctx.putImageData() methods, and thought to myself, "this could be a really efficient way to animate a canvas full of moving objects". So…
Musixauce3000
  • 549
  • 1
  • 3
  • 11
-1
votes
1 answer

How do I accept file uploads from pasting a file into the browser?

Accepting image uploads from a paste into the browser window is much easier than traditional file upload form inputs and even the newer style drag 'n' drop file uploads. How do I implement it?
Richard
  • 4,809
  • 3
  • 27
  • 46