Search Results

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

Page 48/268 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • looping through variable post vars and adding them to the database

    - by Neil Hickman
    I have been given the task of devising a custom forms manager that has a mysql backend. The problem I have now encountered after setting up all the front end, is how to process a form that is dynamic. For E.G Form one could contain 6 fields all with different name attributes in the input tag. Form two could contain 20 fields all with different name attributes in the input tag. How would i process the forms without using up oodles of resource.

    Read the article

  • How does Content-Aware fill work?

    - by CiscoIPPhone
    The upcoming version of Photoshop a feature called Content-Aware fill. This feature will fill a selection of an image based on the surrounding image - to the point it can generate bushes and clouds while being seamless with the surrounding image. See http://www.youtube.com/watch?v=NH0aEp1oDOI for a preview of the Photoshop feature I'm talking about. My question is: How does this feature work algorithmically?

    Read the article

  • what is problem in the following matlab codes

    - by raju
    img=imread('img27.jpg'); %function rectangle=rect_test(img) % edge detection [gx,gy]=gradient(img); gx=abs(gx); gy=abs(gy); g=gx+gy; g=abs(g); % make it 300x300 img=zeros(300); s=size(g); img(1:s(1),1:s(2))=g; figure; imagesc((img)); colormap(gray); title('Edge detection') % take the dct of the image IM=abs(dct2(img)); figure; imagesc((IM)); colormap(gray); title('DCT') % normalize m=max(max(IM)); IM2=IM./m*100; % get rid of the peak size_IM2=size(IM2); IM2(1:round(.05*size_IM2(1)),1:round(.05*size_IM2(2))) = 0; % threshold L=length( find(IM2>20)) ; if( L > 60 ) ret = 1; else ret = 0; end

    Read the article

  • how get fully result from Asynchronism communication?

    - by rima
    Hi all refer to these post : here1 and here2 at last I solve my problem by build a asynchronous solution,and it work well!!! but there is a problem that i face with it,now my code is like this: class MyProcessStarter { private Process process; private StreamWriter myStreamWriter; private static StringBuilder shellOutput = null; public String GetShellOutput { get { return shellOutput.ToString(); }} public MyProcessStarter(){ shellOutput = new StringBuilder(""); process = new Process(); process.StartInfo.FileName = "sqlplus"; process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNoWindow = true; process.OutputDataReceived += new DataReceivedEventHandler(ShellOutputHandler); process.StartInfo.RedirectStandardInput = true; process.StartInfo.RedirectStandardOutput = true; //process.StartInfo.RedirectStandardError = true; process.Start(); myStreamWriter = process.StandardInput; process.BeginOutputReadLine(); } private static void ShellOutputHandler(object sendingProcess,DataReceivedEventArgs outLine) { if (!String.IsNullOrEmpty(outLine.Data)) shellOutput.Append(Environment.NewLine + outLine.Data); } public void closeConnection() { myStreamWriter.Close(); process.WaitForExit(); process.Close(); } public void RunCommand(string arguments) { myStreamWriter.WriteLine(arguments); myStreamWriter.Flush(); process.WaitForExit(100); Console.WriteLine(shellOutput); Console.WriteLine("============="+Environment.NewLine); process.WaitForExit(2000); Console.WriteLine(shellOutput); } } and my input is like this: myProcesStarter.RunCommand("myusername/mypassword"); Console.writeline(myProcesStarter.GetShellOutput); but take a look at my out put: SQL*Plus: Release 11.1.0.6.0 - Production on Thu May 20 11:57:38 2010 Copyright (c) 1982, 2007, Oracle. All rights reserved. ============= SQL*Plus: Release 11.1.0.6.0 - Production on Thu May 20 11:57:38 2010 Copyright (c) 1982, 2007, Oracle. All rights reserved. Enter user-name: Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options as u see the output for run a function is not same in different time!So now would you do me a faver and help me that how I can wait until all the output done in other mean how I can customize my process to wait until output finishing ?? because I want to write a sqlcompiler so I need the exact output of shell. plz help me soon.thanxxxxxxxxxxxx :X

    Read the article

  • Is there something like clock() that works better for parallel code?

    - by Jared P
    So I know that clock() measures clock cycles, and thus isn't very good for measuring time, and I know there are functions like omp_get_wtime() for getting the wall time, but it is frustrating for me that the wall time varies so much, and was wondering if there was some way to measure distinct clock cycles (only one cycle even if more than one thread executed in it). It has to be something relatively simple/native. Thanks

    Read the article

  • Can anyone recommend a decent tool for optimising images other than photoshop

    - by toomanyairmiles
    Can anyone recommend a decent tool for optimising images other than adobe photoshop, the gimp etc? I'm looking to optimise images for the web preferably online and free. Basically I have a client who can't install additional software on their work PC but needs to optimise photographs and other images for their website and is presently uploading 1 or 2 Mb files. On a personal level I'm interested to see what other people are using...

    Read the article

  • uneven illuminated images

    - by coul
    How to get rid of uneven illumination from images, that contain text data, usually printed but may be handwritten? It can have some spots of lights because the light reflected while making picture. I've seen the Halcon program's segment_characters function that is doing this work perfectly, but it is not open source. I wish to convert an image to the image that has a constant illumination at background and more dark colored regions of text. So that binarization will be easy and without noise. The text is assumed to be dark colored than it's background. Any ideas?

    Read the article

  • Cepstral Analysis for pitch detection

    - by Ohmu
    Hi! I'm looking to extract pitches from a sound signal. Someone on IRC just explain to me how taking a double FFT achieves this. Specifically: take FFT take log of square of absolute value (can be done with lookup table) take another FFT take absolute value I am attempting this using vDSP I can't understand how I didn't come across this technique earlier. I did a lot of hunting and asking questions; several weeks worth. More to the point, I can't understand why I didn't think of it. I am attempting to achieve this with vDSP library. it looks as though it has functions to handle all of these tasks. However, I'm wondering about the accuracy of the final result. I have previously used a technique which scours the frequency bins of a single FFT for local maxima. when it encounters one, it uses a cunning technique (the change in phase since the last FFT) to more accurately place the actual peak within the bin. I am worried that this precision will be lost with this technique I'm presenting here. I guess the technique could be used after the second FFT to get the fundamental accurately. But it kind of looks like the information is lost in step 2. as this is a potentially tricky process, could someone with some experience just look over what I'm doing and check it for sanity? also, I've heard there is an alternative technique involving fitting a quadratic over neighbouring bins. Is this of comparable accuracy? if so, I would favour it, as it doesn't involve remembering bin phases. so questions: does this approach makes sense? Can it be improved? I'm a bit worried about And the log square component; there seems to be a vDSP function to do exactly that: vDSP_vdbcon however, there is no indication it precalculates a log-table -- I assume it doesn't, as the FFT function requires an explicit pre-calculation function to be called and passed into it. and this function doesn't. Is there some danger of harmonics being picked up? is there any cunning way of making vDSP pull out the maxima, biggest first? Can anyone point me towards some research or literature on this technique? the main question: is it accurate enough? Can the accuracy be improved? I have just been told by an expert that the accuracy IS INDEED not sufficient. Is this the end of the line? Pi PS I get SO annoyed (npi) when I want to create tags, but cannot. :| I have suggested to the maintainers that SO keep track of attempted tags, but I'm sure I was ignored. we need tags for vDSP, accelerate framework, cepstral analysis

    Read the article

  • Navigation graphics overlayed over video

    - by Hrishikesh Choudhari
    Hey, Imagine I have a video playing.. Can I have some sort of motion graphics being played 'over' that video.. Like say the moving graphics is on an upper layer than the video, which would be the lower layer.. I am comfortable in a C++ and Python, so a solution that uses these two will be highly appreciated.. Thank you in advance, Rishi..

    Read the article

  • How to scale JPEG images with a non-standard sampling factor in Java?

    - by HRJ
    I am using Java AWT for scaling a JPEG image, to create thumbnails. The code works fine when the image has a normal sampling factor ( 2x2,1x1,1x1 ) However, an image which has this sampling factor ( 1x1, 1x1, 1x1 ) creates problem when scaled. The colors get corrupted though the features are recognizable. The original and the thumbnail: The code I am using is roughly equivalent to: static BufferedImage awtScaleImage(BufferedImage image, int maxSize, int hint) { // We use AWT Image scaling because it has far superior quality // compared to JAI scaling. It also performs better (speed)! System.out.println("AWT Scaling image to: " + maxSize); int w = image.getWidth(); int h = image.getHeight(); float scaleFactor = 1.0f; if (w > h) scaleFactor = ((float) maxSize / (float) w); else scaleFactor = ((float) maxSize / (float) h); w = (int)(w * scaleFactor); h = (int)(h * scaleFactor); // since this code can run both headless and in a graphics context // we will just create a standard rgb image here and take the // performance hit in a non-compatible image format if any Image i = image.getScaledInstance(w, h, hint); image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); Graphics2D g = image.createGraphics(); g.drawImage(i, null, null); g.dispose(); i.flush(); return image; } (Code courtesy of this page ) Is there a better way to do this? Here's a test image with sampling factor of [ 1x1, 1x1, 1x1 ].

    Read the article

  • Why '.png' files produced by ImageMagick are so much bigger than '.jpg' & '.gif' files?

    - by Nick Gorbikoff
    Hello. I'm using ImageMagick to convert some files from one format to another. I was always under the impression that .png files were supposed to be as big/small as .jpg if not smaller, and definitely smaller than .gif. However when I run convert photo.jpg photo.png The files I'm getting out is about 6 times bigger than the original jpg. Original jpg is a regular photo about 300x500 px, 52 kb. Output is a proper png of the same dimensions, but size is about 307 kb? Does anyoone know what the hack is going on? Am I doing something wrong? P.S.: I tried both on Debian and Windows with the same results.

    Read the article

  • Saving a remote image with cURL?

    - by thebluefox
    Morning all, Theres a few questions around this but none that really answer my question, as far as I ca understand. Basically I have a GD script that deals with resizing and caching images on our server, but I need to do the same with images stored on a remote server. So, I'm wanting to save the image locally, then resize and display it as normal. I've got this far... $file_name_array = explode('/', $filename); $file_name_array_r = array_reverse($file_name_array); $save_to = 'system/cache/remote/'.$file_name_array_r[1].'-'.$file_name_array_r[0]; $ch = curl_init($filename); $fp = fopen($save_to, "wb"); // set URL and other appropriate options $options = array(CURLOPT_FILE => $fp, CURLOPT_HEADER => 0, CURLOPT_FOLLOWLOCATION => 1, CURLOPT_TIMEOUT => 60); // 1 minute timeout (should be enough) curl_setopt_array($ch, $options); curl_exec($ch); curl_close($ch); fclose($fp); This creates the image file, but does not copy it accross? Am I missing the point? Cheers guys.

    Read the article

  • function taking in an input image and different kernel size

    - by drifterOcean19
    I have this filtering function that takes an input image, performs convolution using a given kernel, and returns the resulting image. However, I can't seem to work it out how to make it takes different kernel sizes.For example instead of pre-defined 3x3 kernel as below in the code, it could instead take 5x5 or 7x7. and then the user could input the type of kernel/filter they want(Depending on the intended effect). I can't seem to put my head around it. i'm quite new to matlab. function [newImg] = kernelFunc(imgB) img=imread(imgB); figure,imshow(img); img2=zeros(size(img)+2); newImg=zeros(size(img)); for rgb=1:3 for x=1:size(img,1) for y=1:size(img,2) img2(x+1,y+1,rgb)=img(x,y,rgb); end end end for rgb=1:3 for i= 1:size(img2,1)-2 for j=1:size(img2,2)-2 window=zeros(9,1); inc=1; for x=1:3 for y=1:3 window(inc)=img2(i+x-1,j+y-1,rgb); inc=inc+1; end end kernel=[1;2;1;2;4;2;1;2;1]/16; med=window.*kernel; disp(med); med=sum(med); med=floor(med); newImg(i,j,rgb)=med; end end end newImg=uint8(newImg); figure,imshow(newImg); end

    Read the article

  • Using PHP GD to create image form text with different fonts.

    - by Meredith
    I have been using this simple script to generate images from text: <?php header('Content-type: image/png'); $color = RgbfromHex($_GET['color']); $text = urldecode($_GET['text']); $font = 'arial.ttf'; $im = imagecreatetruecolor(400, 30); $bg_color = imagecolorallocate($im, 255, 255, 255); $font_color = imagecolorallocate($im, $color[0], $color[1], $color[2]); imagefilledrectangle($im, 0, 0, 399, 29, $bg_color); imagettftext($im, 20, 0, 10, 20, $font_color, $font, $text); imagepng($im); imagedestroy($im); function RgbfromHex($hexValue) { if(strlen(trim($hexValue))==6) { return array( hexdec(substr($hexValue,0,2)), // R hexdec(substr($hexValue,2,4)), // G hexdec(substr($hexValue,4,6)) // B ); } else return array(0, 0, 0); } ?> I call the script with file.php?text=testing script&color=000000 Now I'd like to know how could I generate text with normal and bold fonts mixed in the same image, something like file.php?text=testing <b>script</b>&color=000000

    Read the article

  • C++ converting binary(P5) image to ascii(P2) image (.pgm)

    - by tubby
    I am writing a simple program to convert grayscale binary (P5) to grayscale ascii (P2) but am having trouble reading in the binary and converting it to int. #include <iostream> #include <fstream> #include <sstream> using namespace::std; int usage(char* arg) { // exit program cout << arg << ": Error" << endl; return -1; } int main(int argc, char* argv[]) { int rows, cols, size, greylevels; string filetype; // open stream in binary mode ifstream istr(argv[1], ios::in | ios::binary); if(istr.fail()) return usage(argv[1]); // parse header istr >> filetype >> rows >> cols >> greylevels; size = rows * cols; // check data cout << "filetype: " << filetype << endl; cout << "rows: " << rows << endl; cout << "cols: " << cols << endl; cout << "greylevels: " << greylevels << endl; cout << "size: " << size << endl; // parse data values int* data = new int[size]; int fail_tracker = 0; // find which pixel failing on for(int* ptr = data; ptr < data+size; ptr++) { char t_ch; // read in binary char istr.read(&t_ch, sizeof(char)); // convert to integer int t_data = static_cast<int>(t_ch); // check if legal pixel if(t_data < 0 || t_data > greylevels) { cout << "Failed on pixel: " << fail_tracker << endl; cout << "Pixel value: " << t_data << endl; return usage(argv[1]); } // if passes add value to data array *ptr = t_data; fail_tracker++; } // close the stream istr.close(); // write a new P2 binary ascii image ofstream ostr("greyscale_ascii_version.pgm"); // write header ostr << "P2 " << rows << cols << greylevels << endl; // write data int line_ctr = 0; for(int* ptr = data; ptr < data+size; ptr++) { // print pixel value ostr << *ptr << " "; // endl every ~20 pixels for some readability if(++line_ctr % 20 == 0) ostr << endl; } ostr.close(); // clean up delete [] data; return 0; } sample image - Pulled this from an old post. Removed the comment within the image file as I am not worried about this functionality now. When compiled with g++ I get output: $> ./a.out a.pgm filetype: P5 rows: 1024 cols: 768 greylevels: 255 size: 786432 Failed on pixel: 1 Pixel value: -110 a.pgm: Error The image is a little duck and there's no way the pixel value can be -110...where am I going wrong? Thanks.

    Read the article

  • What is the Simplest Possible Payment Gateway to Implement? (using Django)

    - by b14ck
    I'm developing a web application that will require users to either make one time deposits of money into their account, or allow users to sign up for recurring billing each month for a certain amount of money. I've been looking at various payment gateways, but most (if not all) of them seem complex and difficult to get working. I also see no real active Django projects which offer simple views for making payments. Ideally, I'd like to use something like Amazon FPS, so that I can see online transaction logs, refund money, etc., but I'm open to other things. I just want the EASIEST possible payment gateway to integrate with my site. I'm not looking for anything fancy, whatever does the job, and requires < 10 hours to get working from start to finish would be perfect. I'll give answer points to whoever can point out a good one. Thanks!

    Read the article

  • "painting" one array onto another using python / numpy

    - by Nate
    I'm writing a library to process gaze tracking in Python, and I'm rather new to the whole numpy / scipy world. Essentially, I'm looking to take an array of (x,y) values in time and "paint" some shape onto a canvas at those coordinates. For example, the shape might be a blurred circle. The operation I have in mind is more or less identical to using the paintbrush tool in Photoshop. I've got an interative algorithm that trims my "paintbrush" to be within the bounds of my image and adds each point to an accumulator image, but it's slow(!), and it seems like there's probably a fundamentally easier way to do this. Any pointers as to where to start looking?

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >