Questions tagged [processing]

29192 questions
0

votes
2

answer
50

Views

Can we improve performance on lists other than java 8 parallel streams

I have to dump data from somewhere by calling rest API which returns List. First i have to get some List object from one rest api. Now used parallel stream and gone through each item with forEach. Now on for each element i have to call some other api to get the data which returns again list and save...
Pavan
1

votes
1

answer
408

Views

FFmpeg how to get an image for a particular 'coded_picture_number' together with motion vectors

I am looking for ways to get this output from ffmpeg: Basically, I would like to pass to the shell, a command that allows me to output a particular frame number, let's say coded_picture_number=200 with the motion vectors drawn into it. Any clue? Thanks in advance.
user102859
1

votes
1

answer
2.7k

Views

Python: Moving files to folder based on filenames

I have a folder with 10 images that I wish to move into a new folder based on it's current filenames. I've successfully been able to move every images in the folder into a new folder, and as of now I've been successful at moving each image filename to its own folder but I've yet to figure out how to...
ZenB883
1

votes
1

answer
146

Views

How to make everything other than face transparent

I'm trying to extract the face from an image using opencv. Initially I'm converting the image to grayscale like so gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) Then I'm using dlib to generate facial points for me and then converting that to a numpy array and using fillconvexpoly method to get the...
Saikiran
-1

votes
0

answer
11

Views

What are the technologies I have to hire to make a AI based Camera APP for a Desktop?

(Note : if the question belong to different stackexhange notify me or mark for migration.Don't downvote ) Our decided to develop an application with below features The aim of the application is to dress a person using previously uploaded clothing materials who is standing before a display with camer...
Lord Commander
1

votes
1

answer
209

Views

How to interprete the result of the skimage radon transform

I'm wondering how I should interprete the result of the radon transform of skimage. The documentation is not really precise. Let's take this image as an example. The 2 lines are represented by the black dots in the picture on the right side. One line has 45 degrees and the other one 135 degrees. Now...
Sheradil
1

votes
2

answer
35

Views

How to handle API error in a foreach loop R?

FYI, based on some comments I added more information. I created the following function that is making a call to an API: keyword_checker
Franck
1

votes
2

answer
74

Views

Get all values of a generated Annotation in an Annotation Processor

I have a VariableElement field that is annotated with a generated Annotation (which is why I can't use field.getAnnotation(annotationClass)). I need to get all parameters passed to this annotation. Note that by 'a generated Annotation' I mean that literally the Annotation class itself (not the annot...
Namnodorel
1

votes
1

answer
46

Views

Write a program that adds together all the numbers between 0 and 100. Print the result

I want to write a program that adds all the numbers between 0 and 100 but my code does not add everything correctly. How do I add the next number to the number and then print the sum? This is the code I have: for(int i = 0; i
Ahum
1

votes
1

answer
30

Views

Multiprocessing on a list being passed to a function

I have a function that processes one url at a time: def sanity(url): try: if 'media' in url[:10]: url = 'http://dummy.s3.amazonaws.com' + url req = urllib.request.Request(url, headers={'User-Agent' : 'Magic Browser'}) ret = urllib.request.urlopen(req) allurls.append(url) return 1 except (urllib.requ...
Eswar
1

votes
1

answer
39

Views

Does @everywhere not load a function on the master?

I made a module with an if condition on the number of cores. If the number of cores is more than 1 the route is parallel; otherwise, it goes the serial route as seen in the code below module mymodule import Pkg using Distributed if nworkers() > 1 @everywhere using Pkg @everywhere Pkg.activate('.') @...
1

votes
1

answer
31

Views

Is there a way to apply a threshold to an image 1 row at a time

I am trying to apply a threshold to an image 1 row at a time. I want to be able to select the the row the threshold would begin and end. Ex. if I have a 1000 x 1000 image I would like to apply my threshold beginning at row 200 and end at row 850. Currently I am able to apply a threshold to an entire...
Ricardo Zaragoza
1

votes
1

answer
46

Views

Processing: persistence in transparent 3D object

Previously defined shape (triangle) appears but does not persist in 3D object (sphere) but does outside. The triangle appears in the transparent sphere but vanishes at the next rendering. For transparency, I used enabled DEPTH_SORT. // Aim of program: draw a stack of triangles that goes through a tr...
Alchemille
0

votes
0

answer
2

Views

how to add more features to a text in which count Vectorizer has already been applied in python natural language processing

i am currently working on a natural language processing dataset. I have been able to clean the text and i have generated more features from the text feature. I have transformed the text feature using count Vectorizer so as to be able to train the data. However,i seek to add more features to this tra...
Ramadhan Gunia
0

votes
0

answer
6

Views

c# start same console application multiple times with different parameters at scheduled intervals

I have a console application that does few jobs, let's call them tasks. I want to be able to run each task individually or in parallel and one execution should not affect the other. Example if I have a console application CONSOLE A that accepts as parameter a string, an url and when is run, it get's...
user2818430
0

votes
0

answer
7

Views

How to get distance between two objects in given image?

I have one image and there is some puzzle to solve. i want to know the distance between that puzzle in pixels here is link of that image. http://162.243.43.18/Question.png i have tried in tensor but not getting any success
Nilesh Daladra
0

votes
0

answer
2

Views

Lane detection with brightness change and shades on lanes?

I am currently working on a lane detection project, where the input is an RGB road image 'img' from a racing game, and the output is the same image annotated with drawn colored lines on detected lanes. The steps are: Convert the RGB image 'img' to HSL image, then use a white color mask on it (white...
Mohamed EL Tair
1

votes
2

answer
3.9k

Views

How to change invert frames in EmguCV?

Currently, I am working on a real-time IRIS detection application. I want to perform an invert operation to the frames taken from the web camera, like this: I managed to get this line of code, but this is not giving the above results. Maybe parameters need to be changed, but I am not sure. CvInvoke....
gouthaman93
1

votes
0

answer
11

Views

In terms of time complexity, what is the most efficient way to overlay multiple smaller images onto a bigger image?

I am trying to overlay multiple smaller images onto a bigger background image using openCV. Currently I am using addWeighted() API with alpha=1.0 but this API only takes in two images. If img1 is overlaid onto img2 which is in turn overlaid onto img3, then I would have to call addWeighted() multiple...
Rahul Pradeep
1

votes
1

answer
380

Views

Canny Edge vs Thresholding for contour estimation in Open CV

I am using Open CV for an image processing application that involves contour estimation in images. What I would like to know is whether Thresholding the image (like how they have done here) or using Canny Edge Algorithm (here) yields a better result. Does this involve algorithmic analysis or am I m...
rhino2rhonda
-3

votes
0

answer
28

Views

How to edit the “println command”?

I have to write a code, which counts the abudant, dificient and the perfect numbers between 2 to 200. Also I have to make a 'println' command for the console which looks like this: 'The number: 2 is (dificient, abudant, perfect or nothing)' -> in the same line 'Sum of the dividends: XX and if the nu...
amigo5656
1

votes
2

answer
1.5k

Views

OpenCV mean function crashes with mask created from OpenCV threshold function?

I'm very new to OpenCV, so I guess I'm making some silly mistake. First I'm creating an empty cv::mat matrix, mask, of CV_8U type and filling it with zeros. Then I'm filling the matrix with either 0's or 255's by checking the values in CV_32FC1 type cv::mat matrix croppedDifferenceImage by the use...
the_naive
6

votes
0

answer
104

Views

How can I optimize parallel sorting to improve temporal performance?

I have an algorithm for parallel sorting a list of a given length: import Control.Parallel (par, pseq) import Data.Time.Clock (diffUTCTime, getCurrentTime) import System.Environment (getArgs) import System.Random (StdGen, getStdGen, randoms) parSort :: (Ord a) => [a] -> [a] parSort (x:xs) = force...
Vasiliy
1

votes
1

answer
300

Views

NumericMatrix not recognized as a type in RcppParallel Package

I'm learning to use RcppParallel to use in my work and was trying to install a simple package made with Rcpp.package.skeleton(). The package contains three source files, the Rcpp's HelloWorld (rcpp_hello_world.cpp) and the two versions of the matrix transformation functions found in the RcppParallel...
Alpalentless
1

votes
1

answer
1k

Views

Splitting words using nltk module in Python

I am trying to find a way for splitting words in Python using the nltk module. I am unsure how to reach my goal given the raw data I have which is a list of tokenized words e.g. ['usingvariousmolecularbiology', 'techniques', 'toproduce', 'genotypes', 'following', 'standardoperatingprocedures', '.',...
Kookaburra
1

votes
2

answer
1.2k

Views

Python converting an image to use less colors

I want to take an image and (somehow) read it as an array of pixels. Meaning each element of the 2d array would be either a hex code or RGB 3-tuple that represent the color of that pixel. I have looked into image processing and found things like Pillow or SciPy but I only found overly simple things...
Rares Dima
0

votes
1

answer
16

Views

Add chroma noise to image

I'm training a deep neural network to improve the quality of images. The images contain some specific types of noise that I want to reduce/remove by means of a deep learning model. In order to do so I'm using a huge dataset of similar clear high-res images with barely any noise, add the specific typ...
Hendrik Wiese
1

votes
1

answer
1.5k

Views

How to resize a labeled mask with nearest neighbor interpolation using scikit-image

I want to resize a labeled segmentation mask specifically with nearest neighbor interpolation. scikit-image has two relevant functions: resize and rescale But neither of these functions allow you to specify the interpolation method. It is very important to use 'nearest neighbor' interpolation when r...
cdeepakroy
1

votes
1

answer
388

Views

Find the perimeter of the leaf

Here is a leaf I want to find the length of it's periphery i.e. it's perimeter using openCV and Python.I tried writing a code but it is not giving the desired result.I have to reset the threshold for every example and also it's not giving a closed contour.I want it to be a generalized code to work o...
Muskan Bansal
1

votes
2

answer
66

Views

Converting 1D array to 2D array regarding FOR loops Processing

I am working on a tic-tac-toe game in my computer science class using processing. In my program, I am coding a 3 in a row checker and I am trying to code this using a 2D array code since my array was initialized as a 2D array when coding the X / O. As well as, my teacher gave us an example of doing...
Mayer
1

votes
1

answer
36

Views

Assigning values to global environment variable using parallel sapply

I have recently started working with the parallel package in R and it is working wonders for me. Still, I have encountered an issue for which I have not found answer. I am trying to reformat some data and, to do so, I use sapply() or parSapply() in the parallel case. In the normal case, I go: sapply...
boski
1

votes
3

answer
58

Views

Can I draw a step by step my backtracking using Processing?

I want to write a backtracking -8 Queens- visualization code using processing. So I tried to use noLoop() inside setup() and call redraw() followed by a delay(100) in each update step but it didn't work. Here are my functions. int cellH = 38, cellW = 38, n = 8; PImage img; boolean [][] grid; boolean...
Muhammad Magdi
1

votes
1

answer
68

Views

How to solve an error about drawcircle in Matlab?

In the following code, that is for draw a circle on an image, an error occurred. I try to solve it but I can't find the problem. figure('color', [1 1 1]); clf; imshow(inputVol(:,:,85),[]); drawcircle([blobSlice(ind,2),blobSlice(ind,1)],round(sqrt(3)*blobSlice(ind,4)),50,'-','g', 1); % Error For Ins...
eli
1

votes
1

answer
99

Views

Merge multiple images in Go

I am trying to merge an array of N images (where N will be a dynamic value) with Go, but I always get a black image as result. Here you are my code: package main import ( 'image' 'image/draw' 'image/jpeg' 'image/png' 'log' 'os' ) func openAndDecode(imgPath string) image.Image { img, err := os.Open(i...
Michele Riva
1

votes
2

answer
108

Views

Batch attachment of multiple .ttf files to a .mkv

Ok, I'm total new at this... Basically I'm using a tool call mkvmerge to attach multiple font files(.ttf) to .mkv files. I have separated the .mkv files into folders together with the respective fonts I would like to attach. My aim is to create a batch that creates a copy of all the .mkv files with...
PunyTed
1

votes
1

answer
48

Views

Openmp program works without critical section

In an Openmp lecture a similar code is shown as a race condition in Openmp. In the for loop the sum+= is not in a critical section, so the order the threads are executed change the result. But this is not the case in my program. No matter how often I run this program, the sum is always printed as 28...
relot
1

votes
1

answer
47

Views

How does np.outer help in creating a filter kernel?

I was trying the filter2D function with OpenCV using my own kernel: kernel = np.array([1,3,4,5,2]) / 11 cv2.filter2D(img, -1, kernel) and it works fine. I also saw a snippet where the same thing was done as follows: kernel = np.array([1,3,4,5,2]) / 11 kernel = np.outer(kernel, kernel) cv2.filter2D(i...
Sophia
1

votes
1

answer
33

Views

Using gaussian blur with zero size kernel?

I was reading about Gaussian Blur when one of the examples I came across was as follows: cv2.GaussianBlur(img, (0,0), 5) What does 0,0 mean here? This is in sharp contrast to another example I read: cv2.GaussianBlur(img,(5,5),0) How are both different from each other?
Harris Pat
0

votes
0

answer
7

Views

I need to grayscale a image folder, but this folder has a lot of images

I need to grayscale a image folder, but this folder has a lot of images. And the only way that i found until now is doing one by one. I was tring this code: FILES % plot a% plot But this code wasn't working, so I try to create a function to do the same thing, but didn't work too . grayimage
Sarah
1

votes
1

answer
34

Views

Unigram vs Bigram vs Posgram in Natural Language Processing

I want to know what is the meaning and difference between unigram, bigram and posgram. I have searched the Internet but I could not find a comprehensive answer. Any help would be very much appreciated.
Eliyah

View additional questions