Search Results

Search found 6679 results on 268 pages for 'cube processing'.

Page 42/268 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Java Imaging Framework

    - by Prabhakar
    Is there any Open source or Commercial Java frameworks for doing image operations such as converting the images from one format to other and scaling the images etc. There should be no installation.Set of jars that are in classpath that will do the job. I have looked into the java-image-scaling library but it is having issues. Thanks in advance.

    Read the article

  • deciding between subprocess, multiprocesser and thread in Python?

    - by user248237
    I'd like to parallelize my Python program so that it can make use of multiple processors on the machine that it runs on. My parallelization is very simple, in that all the parallel "threads" of the program are independent and write their output to separate files. I don't need the threads to exchange information but it is imperative that I know when the threads finish since some steps of my pipeline depend on their output. Portability is important, in that I'd like this to run on any Python version on Mac, Linux and Windows. Given these constraints, which is the most appropriate Python module for implementing this? I am tryign to decide between thread, subprocess and multiprocessing, which all seem to provide related functionality. Any thoughts on this? I'd like the simplest solution that's portable. Thanks.

    Read the article

  • Can anyone give me a sample DSP script in C/C++

    - by Andrew
    Im working on a (Audio) DSP project and just wondering if there are any sample (Open source) DSP example that are written in c or c++, for my MSP430 Chip. I just want something as a guideline so i can program my own script using the ACD and DCA on my board for sampling. http://focus.ti.com/docs/toolsw/folders/print/msp-exp430f5438.html Thats my board, MSP430F5438 Experimenter Board, from what i herd it can run dsp script via the USB connection with the computer. Im using CCS ( From TI, code composer studio) and Octave/Matlab. Just any DSP example scripts or sites that will help me create my own would be appreciated. What im tying to do, Partial audio (sampled) track -- Nyquist rate sampling -- over- and undersampling -- reconstruction of the audio track.

    Read the article

  • HMM for perspective estimation in document image, can't understand the algorithm

    - by maximus
    Hello! Here is a paper, it is about estimating the perspective of binary image containing text and some noise or non text objects. PDF document The algorithm uses the Hidden Markov Model: actually two conditions T - text B - backgrouond (i.e. noise) It is hard to understand the algorithm itself. The question is that I've read about Hidden Markov Models and I know that it uses probabilities that must be known. But in this algorithm I can't understand, if they use HMM, how do they get those probabilities (probability of changing the state from S1 to another state for example S2)? I didn't find anything about training there also in that paper. So, if somebody understands it, please tell me. Also is it possible to use HMM without knowing the state change probabilities?

    Read the article

  • Will the values of label and its correspondences change if Image is rotated?

    - by Vinayak Agarwal
    Hi all I have an image in which a text like "VINAYAK 123" is written. The text in the image is at a certain angle, say 30degrees. Now when I extract the labels of the connected components, I get V-1, I-2, N-3, A-4,Y-5,A-6,K-7, 1-8,2-9,3-10( Format: Character- Label No.). Now I rotate the image 30 degrees in the clockwise direction to make the text in the image horizontal. My question is that now if I extract the labels of the connected components, will the character and the label no. correspondence still remain the same? Thanks in advance!

    Read the article

  • Number of threads and thread numbers in Grand Central Dispatch

    - by raphgott
    I am using C and Grand Central Dispatch to parallelize some heavy computations. How can I get the number of threads used by GCD? Also is it possible to know on which thread a piece of code is currently running on? Basically I'd like to use sprng (parallel random numbers) with multiple streams and for that I need to know what stream id to use (and therefore what thread is being used).

    Read the article

  • Image coding library

    - by Dmitry
    Is there any good library for lossless image encoding/decoding that has compression rate more or less similar to PNG but decoding to raw RGB bitmap data would be much faster than PNG? Also alpha transparency is needed, but not essential because, alpha channel could be taken from separate image. Original problem lies in slowness of reading and decoding PNG files on iPhone using standard libraries. Obvious and the simples solution would have been storing raw RGB bitmap data, but then size of unpacked ipa is too large - 4 times larger than PNG files. So, I am trying to find some compromise solution.

    Read the article

  • Run all SQL files in a directory

    - by Khalil Dahab
    I have a number of .sql files which I have to run in order to apply changes made by other developers on an SQL Server 2005 database. The files are named according to the following pattern: 0001 - abc.sql 0002 - abcef.sql 0003 - abc.sql ... Is there a way to run all of them in one go?

    Read the article

  • Using Cepstrum for PDA

    - by CziX
    Hey, I am currently deleveloping a algorithm to decide wheather or not a frame is voiced or unvoiced. I am trying to use the Cepstrum to discriminate between these two situations. I use MATLAB for my implementation. I have some problems, saying something generally about the frame, but my currently implementation looks like (I'm award of the MATLAB has the function rceps, but this haven't worked for either): ceps = abs(ifft(log10(abs(fft(frame.*window')).^2+eps))); Can anybody give me a small demo, that will convert the frame to the power cepstrum, so a single lollipop at the pitch frequency. For instance use this code to generate the frequency. fs = 8000; timelength = 25e-3; freq = 500; k = 0:1/fs:timelength-(1/fs); s = 0.8*sin(2*pi*freq*k); Thanks.

    Read the article

  • iPhone OS: Strategies for high density image work

    - by Jasconius
    I have a project that is coming around the bend this summer that is going to involve, potentially, an extremely high volume of image data for display. We are talking hundreds of 640x480-ish images in a given application session (scaled to a smaller resolution when displayed), and handfuls of very large (1280x1024 or higher) images at a time. I've already done some preliminary work and I've found that the typical 640x480ish image is just a shade under 1MB in memory when placed into a UIImageView and displayed... but the very large images can be a whopping 5+ MB's in some cases. This project is actually be targeted at the iPad, which, in my Instruments tests seems to cap out at about 80-100MB's of addressable physical memory. Details aside, I need to start thinking of how to move huge volumes of image data between virtual and physical memory while preserving the fluidity and responsiveness of the application, which will be high visibility. I'm probably on the higher ends of intermediate at Objective-C... so I am looking for some solid articles and advice on the following: 1) Responsible management of UIImage and UIImageView in the name of conserving physical RAM 2) Merits of using CGImage over UIImage, particularly for the huge images, and if there will be any performance gain 3) Anything dealing with memory paging particularly as it pertains to images I will epilogue by saying that the numbers I have above maybe off by about 10 or 15%. Images may or may not end up being bundled into the actual app itself as opposed to being loaded in from an external server.

    Read the article

  • How to use Haar wavelet to detect LINES on an image?

    - by Ole Jak
    So I have Image like this I want to get something like this (I hevent drawn all lines I want but I hope you can get my idea) I want to use SURF ( (Speeded Up Robust Features) is a robust image descriptor, first presented by Herbert Bay et al. in 2006 ) or something that is based on sums of 2D Haar wavelet responses and makes an efficient use of integral images for finding all straight lines on image. I want to get relative to picture pixel coords start and end points of lines. So on this picture to find all lines between tiles and thouse 2 black lines on top. Is there any such Code Example (with lines search capability) to start from? I love C and C++ but any other readable code will probably work for me=)

    Read the article

  • Rename image file on upload php

    - by blasteralfred
    Hi, I have a form which uploads and re sizes image. The html file file submits data to a php file. The script is as follows; Index.html <form action="resizer.php" method="post" enctype="multipart/form-data"> Image: <input type="file" name="file" /> <input type="submit" name="submit" value="upload" /> </form> Resizer.php <?php require_once('imageresizer.class.php'); $imagename = "myimagename"; //Path To Upload Directory $dirpath = "uploaded/"; //MAX WIDTH AND HEIGHT OF IMAGE $max_height = 100; $max_width = 100; //Create Image Control Object - Parameters(file name, file tmp name, file type, directory path) $resizer = new ImageResizer($_FILES['file']['name'],$_FILES['file']['tmp_name'],$dirpath); //RESIZE IMAGE - Parameteres(max height, max width) $resizer->resizeImage($max_height,$max_width); //Display Image $resizer->showResizedImage(); ?> imageresizer.class.php <?php class ImageResizer{ public $file_name; public $tmp_name; public $dir_path; //Set variables public function __construct($file_name,$tmp_name,$dir_path){ $this->file_name = $file_name; $this->tmp_name = $tmp_name; $this->dir_path = $dir_path; $this->getImageInfo(); $this->moveImage(); } //Move the uploaded image to the new directory and rename public function moveImage(){ if(!is_dir($this->dir_path)){ mkdir($this->dir_path,0777,true); } if(move_uploaded_file($this->tmp_name,$this->dir_path.'_'.$this->file_name)){ $this->setFileName($this->dir_path.'_'.$this->file_name); } } //Define the new filename public function setFileName($file_name){ $this->file_name = $file_name; return $this->file_name; } //Resize the image function with new max height and width public function resizeImage($max_height,$max_width){ $this->max_height = $max_height; $this->max_width = $max_width; if($this->height > $this->width){ $ratio = $this->height / $this->max_height; $new_height = $this->max_height; $new_width = ($this->width / $ratio); } elseif($this->height < $this->width){ $ratio = ($this->width / $this->max_width); $new_width = $this->max_width; $new_height = ($this->height / $ratio); } else{ $new_width = $this->max_width; $new_height = $this->max_height; } $thumb = imagecreatetruecolor($new_width, $new_height); switch($this->file_type){ case 1: $image = imagecreatefromgif($this->file_name); break; case 2: $image = imagecreatefromjpeg($this->file_name); break; case 3: $image = imagecreatefrompng($this->file_name); break; case 4: $image = imagecreatefromwbmp($this->file_name); } imagecopyresampled($thumb, $image, 0, 0, 0, 0, $new_width, $new_height, $this->width, $this->height); switch($this->file_type){ case 1: imagegif($thumb,$this->file_name); break; case 2: imagejpeg($thumb,$this->file_name,100); break; case 3: imagepng($thumb,$this->file_name,0); break; case 4: imagewbmp($thumb,$this->file_name); } imagedestroy($image); imagedestroy($thumb); } public function getImageInfo(){ list($width, $height, $type) = getimagesize($this->tmp_name); $this->width = $width; $this->height = $height; $this->file_type = $type; } public function showResizedImage(){ echo "<img src='".$this->file_name." />"; } public function onSuccess(){ header("location: index.php"); } } ?> Everything is working well. The image will be uploaded in it's original filename and extension with a "_" prefix. But i want to rename the image to "myimagename" on upload, which is a variable in "Resizer.php". How can i make this possible?? Thanks in advance :) blasteralfred

    Read the article

  • CPU Affinity Masks (Putting Threads on different CPUs)

    - by hahuang65
    I have 4 threads, and I am trying to set thread 1 to run on CPU 1, thread 2 on CPU 2, etc. However, when I run my code below, the affinity masks are returning the correct values, but when I do a sched_getcpu() on the threads, they all return that they are running on CPU 4. Anybody know what my problem here is? Thanks in advance! #define _GNU_SOURCE #include <stdio.h> #include <pthread.h> #include <stdlib.h> #include <sched.h> #include <errno.h> void *pthread_Message(char *message) { printf("%s is running on CPU %d\n", message, sched_getcpu()); } int main() { pthread_t thread1, thread2, thread3, thread4; pthread_t threadArray[4]; cpu_set_t cpu1, cpu2, cpu3, cpu4; char *thread1Msg = "Thread 1"; char *thread2Msg = "Thread 2"; char *thread3Msg = "Thread 3"; char *thread4Msg = "Thread 4"; int thread1Create, thread2Create, thread3Create, thread4Create, i, temp; CPU_ZERO(&cpu1); CPU_SET(1, &cpu1); temp = pthread_setaffinity_np(thread1, sizeof(cpu_set_t), &cpu1); printf("Set returned by pthread_getaffinity_np() contained:\n"); for (i = 0; i < CPU_SETSIZE; i++) if (CPU_ISSET(i, &cpu1)) printf("CPU1: CPU %d\n", i); CPU_ZERO(&cpu2); CPU_SET(2, &cpu2); temp = pthread_setaffinity_np(thread2, sizeof(cpu_set_t), &cpu2); for (i = 0; i < CPU_SETSIZE; i++) if (CPU_ISSET(i, &cpu2)) printf("CPU2: CPU %d\n", i); CPU_ZERO(&cpu3); CPU_SET(3, &cpu3); temp = pthread_setaffinity_np(thread3, sizeof(cpu_set_t), &cpu3); for (i = 0; i < CPU_SETSIZE; i++) if (CPU_ISSET(i, &cpu3)) printf("CPU3: CPU %d\n", i); CPU_ZERO(&cpu4); CPU_SET(4, &cpu4); temp = pthread_setaffinity_np(thread4, sizeof(cpu_set_t), &cpu4); for (i = 0; i < CPU_SETSIZE; i++) if (CPU_ISSET(i, &cpu4)) printf("CPU4: CPU %d\n", i); thread1Create = pthread_create(&thread1, NULL, (void *)pthread_Message, thread1Msg); thread2Create = pthread_create(&thread2, NULL, (void *)pthread_Message, thread2Msg); thread3Create = pthread_create(&thread3, NULL, (void *)pthread_Message, thread3Msg); thread4Create = pthread_create(&thread4, NULL, (void *)pthread_Message, thread4Msg); pthread_join(thread1, NULL); pthread_join(thread2, NULL); pthread_join(thread3, NULL); pthread_join(thread4, NULL); return 0; }

    Read the article

  • How do you increase the number of processes in parallel with Powershell 3?

    - by Mark Shay
    I am trying to run 20 processes in parallel. I changed the session as below, but having no luck. I am getting only up to 5 parallel processes per session. $wo=New-PSWorkflowExecutionOption -MaxSessionsPerWorkflow 50 -MaxDisconnectedSessions 200 -MaxSessionsPerRemoteNode 50 -MaxActivityProcesses 50 Register-PSSessionConfiguration -Name ITWorkflows -SessionTypeOption $wo -Force Get-PSSessionConfiguration ITWorkflows | Format-List -Property * Is there a switch parameter to increase the number of processes? This is what I am running: Workflow MyWorkflow1 { Parallel { InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 2 and 2975416"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 2975417 and 5950831"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 5950832 and 8926246"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 8926247 and 11901661"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 11901662 and 14877076"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns"where OrderId between 14877077 and 17852491"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 17852492 and 20827906"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 20827907 and 23803321"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 23803322 and 26778736"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 26778737 and 29754151"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 29754152 and 32729566"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 32729567 and 35704981"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 35704982 and 38680396"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 38680397 and 432472144"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 432472145 and 435447559"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 435447560 and 438422974"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 864944289 and 867919703"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 867919704 and 870895118"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 870895119 and 1291465602"} InlineScript { import-module \\PS_Scripts\bulkins.ps1; BulkIns "where OrderId between 1291465603 and 1717986945"} }

    Read the article

  • GD! Converting a png image to jpeg and making the alpha by default white and not black.

    - by Shawn
    I tried something like this but it just makes the background of the image white, not necessarily the alpha of the image. I wanted to just upload everything as jpg's so if i could somehow "flatten" a png image with some transparently to default it to just be white so i can use it as a jpg instead. Appreciate any help. Thanks. $old = imagecreatefrompng($upload); $background = imagecolorallocate($old,255,255,255); imagefill($old, 0, 0, $background); imagealphablending($old, false); imagesavealpha($old, true);

    Read the article

  • Training sets for AdaBoost algorithm

    - by palau1
    How do you find the negative and positive training data sets of Haar features for the AdaBoost algorithm? So say you have a certain type of blob that you want to locate in an image and there are several of them in your entire array - how do you go about training it? I'd appreciate a nontechnical explanation as much as possible. I'm new to this. Thanks.

    Read the article

  • Matlab: Analysis of signal

    - by Mateusz
    Hi, I have a problem with this task: For free route perform frequency analysis and give parametrs of each signal component: time of beginning and ending of each component beginning and ending frequency amplitude (in time domain) in the beginning and end of each signal's component level of noise in dB Assume, that, the parametrs of each component like amplitude, frequency is changing lineary in time. Frequency of sampling is 1000Hz For example I have signal like this: Nx=64; fs=1000; t=1/fs*(0:Nx-1); %========================== A1=1; A2=4; f1=500; f2=1000; x1=A1*cos(2*pi*f1*t); x2=A2*sin(2*pi*f2*t); %========================== x=x1+x2;

    Read the article

  • Basic image resizing in Ruby on Rails

    - by Koning Baard XIV
    I'm creating a little photo sharing site for our home's intranet, and I have an upload feature, which uploads the photo at original size into the database. However, I also want to save the photo in four other sizes: W=1024, W=512, W=256 and W=128, but only the sizes smaller than the original size (e.g. if the original width is 511, only generate 256 and 128). How can I implement this? I already have this code to upload the photo: pic.rb <-- model def image_file=(input_data) self.filename = input_data.original_filename self.content_type = input_data.content_type.chomp self.binary_data = input_data.read # here it should generate the smaller sizes #+and save them to self.binary_data_1024, etc... end new.rb <-- view <h1>New pic</h1> <% form_for(@pic, :html => {:multipart => true}) do |f| %> <%= f.error_messages %> <p> <%= f.label :title %><br /> <%= f.text_field :title %> </p> <p> <%= f.label :description %><br /> <%= f.text_field :description %> </p> <p> <%= f.label :image_file %><br /> <%= f.file_field :image_file %> </p> <p> <%= f.submit 'Create' %> </p> <% end %> <%= link_to 'Back', pics_path %> Thanks

    Read the article

  • Are there any well known algorithms to detect the presence of names?

    - by Rhubarb
    For example, given a string: "Bob went fishing with his friend Jim Smith." Bob and Jim Smith are both names, but bob and smith are both words. Weren't for them being uppercase, there would be less indication of this outside of our knowledge of the sentence. Without doing grammar analysis, are there any well known algorithms for detecting the presence of names, at least Western names?

    Read the article

  • Simple but efficient way to store a series of small changes to an image?

    - by finnw
    I have a series of images. Each one is typically (but not always) similar to the previous one, with 3 or 4 small rectangular regions updated. I need to record these changes using a minimum of disk space. The source images are not compressed, but I would like the deltas to be compressed. I need to be able to recreate the images exactly as input (so a lossy video codec is not appropriate.) I am thinking of something along the lines of: Composite the new image with a negative of the old image Save the composited image in any common format that can compress using RLE (probably PNG.) Recreate the second image by compositing the previous image with the delta. Although the images have an alpha channel, I can ignore it for the purposes of this function. Is there an easy-to-implement algorithm or free Java library with this capability?

    Read the article

  • Django-imagekit: how to reduce image quality with a preprocessor_spec ?

    - by pierre-guillaume-degans
    Hi, please excuse me for my ugly english :p I've created this simple model class, with a Preprocessor to reduce my photos'quality (the photos'extension is .JPG): from django.db import models from imagekit.models import ImageModel from imagekit.specs import ImageSpec from imagekit import processors class Preprocessor(ImageSpec): quality = 50 processors = [processors.Format] class Picture(ImageModel): image = models.ImageField(upload_to='pictures') class IKOptions: preprocessor_spec = Preprocessor The problem : pictures'quality are not reduced. :( Any idea to fix it ? Thank you very much ;)

    Read the article

  • How to generate a lower frequency version of a signal in Matlab?

    - by estourodepilha.com
    With a sine input, I tried to modify it's frequency cutting some lower frequencies in the spectrum, shifting the main frequency towards zero. As the signal is not fftshifted I tried to do that by eliminating some samples at the begin and at the end of the fft vector: interval = 1; samplingFrequency = 44100; signalFrequency = 440; sampleDuration = 1 / samplingFrequency; timespan = 1 : sampleDuration : (1 + interval); original = sin(2 * pi * signalFrequency * timespan); fourierTransform = fft(original); frequencyCut = 10; %% Hertz frequencyCut = floor(frequencyCut * (length(pattern) / samplingFrequency) / 4); %% Samples maxFrequency = length(fourierTransform) - (2 * frequencyCut); signal = ifft(fourierTransform(frequencyCut + 1:maxFrequency), 'symmetric'); But it didn't work as expected. I also tried to remove the center part of the spectrum, but it wielded a higher frequency sine wave too. How to make it right?

    Read the article

  • Is their an optimal config/format for a TIFF when using Tesseract or other OCR?

    - by Zando
    I'm having a bizarre problem with Tesseract. I have a name, "Janice" that is in a 200x40 pixel tiff, that Tesseract interprets as a blank. I'm running hundreds of names through Tesseract and they are processed fine. What I'm actually doing, though, is breaking up a larger TIFF into smaller tiffs of one word each. In the larger TIFF, tesseract recognizes "Janice". What could cause it to hiccup in a TIFF that solely contains that word (and there's enough space around the word to not truncate any of the pixels)? I'm using ImageMagick to split the big TIFF, are there options I should set when reconstituting the new TIFF files?

    Read the article

  • Coordinate geometry operations in images/discrete space

    - by avd
    I have images which have line segments, rays etc. I am representing these line segments using Bresenham algorithm (means whatever coordinates I get using this algorithm between two points). Now I want to do operations such as finding intersection point between two line segments, finding the projection of one vector onto other etc... The problem is I am not working in continuous space. The line segments are being approximated using Bresenham algorithm. So I want suggestions on what are the best and most efficient ways to do this? A link to C++ library or implementation would also be good enough. Please suggest some books which deal with such problems.

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >