Search Results

Search found 24094 results on 964 pages for 'image processing'.

Page 18/964 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Monthly Payment Processing

    - by jack
    I am building site for a client in .NET. The site has a monthly subscription service, wherein customer pay for the services with debit/credit card details. Money will be deducted from the account regularly. Customers can cancel the subscription service at any time and the collection should be stopped. Is there any service that I can use to accomplish this? Any information on how to go about developing this will be much appreciated. Thanks in advance.

    Read the article

  • video processing with opencv

    - by mithila
    i'm trying to detect car in a video file.i can do background subtraction and the moving cars are visible as foreground object. but i can't draw rectangle around the car. how can i do it? or how can i say in a particular area of the frame there is a car/or there is no car now.please help.

    Read the article

  • multi-core processing in R on windows XP - via doMC and foreach

    - by Jan
    Hi guys, I'm posting this question to ask for advice on how to optimize the use of multiple processors from R on a Windows XP machine. At the moment I'm creating 4 scripts (each script with e.g. for (i in 1:100) and (i in 101:200), etc) which I run in 4 different R sessions at the same time. This seems to use all the available cpu. I however would like to do this a bit more efficient. One solution could be to use the "doMC" and the "foreach" package but this is not possible in R on a Windows machine. e.g. library("foreach") library("strucchange") library("doMC") # would this be possible on a windows machine? registerDoMC(2) # for a computer with two cores (processors) ## Nile data with one breakpoint: the annual flows drop in 1898 ## because the first Ashwan dam was built data("Nile") plot(Nile) ## F statistics indicate one breakpoint fs.nile <- Fstats(Nile ~ 1) plot(fs.nile) breakpoints(fs.nile) # , hpc = "foreach" --> It would be great to test this. lines(breakpoints(fs.nile)) Any solutions or advice? Thanks, Jan

    Read the article

  • Parallel processing via multithreading in Java

    - by Robz
    There are certain algorithms whose running time can decrease significantly when one divides up a task and gets each part done in parallel. One of these algorithms is merge sort, where a list is divided into infinitesimally smaller parts and then recombined in a sorted order. I decided to do an experiment to test whether or not I could I increase the speed of this sort by using multiple threads. I am running the following functions in Java on a Quad-Core Dell with Windows Vista. One function (the control case) is simply recursive: // x is an array of N elements in random order public int[] mergeSort(int[] x) { if (x.length == 1) return x; // Dividing the array in half int[] a = new int[x.length/2]; int[] b = new int[x.length/2+((x.length%2 == 1)?1:0)]; for(int i = 0; i < x.length/2; i++) a[i] = x[i]; for(int i = 0; i < x.length/2+((x.length%2 == 1)?1:0); i++) b[i] = x[i+x.length/2]; // Sending them off to continue being divided mergeSort(a); mergeSort(b); // Recombining the two arrays int ia = 0, ib = 0, i = 0; while(ia != a.length || ib != b.length) { if (ia == a.length) { x[i] = b[ib]; ib++; } else if (ib == b.length) { x[i] = a[ia]; ia++; } else if (a[ia] < b[ib]) { x[i] = a[ia]; ia++; } else { x[i] = b[ib]; ib++; } i++; } return x; } The other is in the 'run' function of a class that extends thread, and recursively creates two new threads each time it is called: public class Merger extends Thread { int[] x; boolean finished; public Merger(int[] x) { this.x = x; } public void run() { if (x.length == 1) { finished = true; return; } // Divide the array in half int[] a = new int[x.length/2]; int[] b = new int[x.length/2+((x.length%2 == 1)?1:0)]; for(int i = 0; i < x.length/2; i++) a[i] = x[i]; for(int i = 0; i < x.length/2+((x.length%2 == 1)?1:0); i++) b[i] = x[i+x.length/2]; // Begin two threads to continue to divide the array Merger ma = new Merger(a); ma.run(); Merger mb = new Merger(b); mb.run(); // Wait for the two other threads to finish while(!ma.finished || !mb.finished) ; // Recombine the two arrays int ia = 0, ib = 0, i = 0; while(ia != a.length || ib != b.length) { if (ia == a.length) { x[i] = b[ib]; ib++; } else if (ib == b.length) { x[i] = a[ia]; ia++; } else if (a[ia] < b[ib]) { x[i] = a[ia]; ia++; } else { x[i] = b[ib]; ib++; } i++; } finished = true; } } It turns out that function that does not use multithreading actually runs faster. Why? Does the operating system and the java virtual machine not "communicate" effectively enough to place the different threads on different cores? Or am I missing something obvious?

    Read the article

  • Jquery resizing image

    - by michele
    I'd like to start a discussion about the image resizing using jQuery. That's my contribution: But I think I'm far away from the solution. What about the cropping? Who can help me? $(document).ready(function() { $('.story-small img').each(function() { var maxWidth = 100; // Max width for the image var maxHeight = 100; // Max height for the image var ratio = 0; // Used for aspect ratio var width = $(this).width(); // Current image width var height = $(this).height(); // Current image height // Check if the current width is larger than the max if(width > maxWidth){ ratio = maxWidth / width; // get ratio for scaling image $(this).css("width", maxWidth); // Set new width $(this).css("height", height * ratio); // Scale height based on ratio height = height * ratio; // Reset height to match scaled image } // Check if current height is larger than max if(height > maxHeight){ ratio = maxHeight / height; // get ratio for scaling image $(this).css("height", maxHeight); // Set new height $(this).css("width", width * ratio); // Scale width based on ratio width = width * ratio; // Reset width to match scaled image } }); });

    Read the article

  • jQuery click event on image only fires once

    - by stephenreece@
    I created a view of thumbnails. When the user clicks, I want the real image to pop-up in a dialog. That works the first time, but once the jQuery 'click' fires on an thumbnail it never fires again unless I reload the entire page. I've tried rebinding the click events on the dialog close that that does not help. Here is my code: function LoadGalleryView() { $('img.gallery').each(function(){ BindImage($(this)); }); } function BindImage(image) { var src= image.attr('src'); var id= image.attr('id'); var popurl = src.replace("thumbs/", ""); image.hover(function(){ image.attr('style', 'height: 100%; width: 100%;'); }, function(){ image.removeAttr('style'); }); $('#'+id).live('click', function() { PopUpImage(popurl); }); } function CheckImage(img,html) { if ( img.complete ) { $('#galleryProgress').html(''); var imgwidth = img.width+35; var imgheight = img.height+65; $('<div id="viewImage" title="View"></div>').html(html).dialog( { bgiframe: true, autoOpen: true, modal: true, width: imgwidth, height: imgheight, position: 'center', closeOnEscape: true }); } else { $('#galleryProgress').html('<img src="images/ajax-loader.gif" /><br /><br />'); setTimeout(function(){CheckImage(img,html);},10); } } function PopUpImage(url) { var html = '<img src="'+url+'" />'; var img = new Image(); img.src = url; if ( ! img.complete ) { setTimeout(function(){CheckImage(img,html);},10); } } PopUpImage() only executes the first time an image is clicked and I cannot figure out how to rebind.

    Read the article

  • File processing-Haskell

    - by Martinas Maria
    How can I implement in haskell the following: I receive an input file from the command line. This input file contains words separated with tabs,new lines and spaces.I have two replace this elements(tabs,new lines and spaces) with comma(,) .Observation:more newlines,tabs,spaces will be replaced with a single comma.The result has to be write in a new file(output.txt). Please help me with this.My haskell skills are very scarse. This is what I have so far: processFile::String->String processFile [] =[] processFile input =input process :: String -> IO String process fileName = do text <- readFile fileName return (processFile text) main :: IO () main = do n <- process "input.txt" print n In processFile function I should process the text from the input file. I'm stuck..Please help.

    Read the article

  • How to fix Java Image Fetcher error ?

    - by Frank
    My code looks like this : private static JFileChooser fc; if (fc==null) { fc=new JFileChooser(Image_Dir); fc.addChoosableFileFilter(new Image_Filter()); // Add a custom file filter and disable the default (Accept All) file filter. fc.setAcceptAllFileFilterUsed(false); fc.setAccessory(new Image_Preview(fc)); // Add the preview pane. } int returnVal=fc.showDialog(JFileChooser_For_Image.this,"Get Image"); // Show it. After I select an image from the panel, I got the following error message : Exception in thread "Image Fetcher 0" java.lang.UnsatisfiedLinkError: Native Library C:\Program Files (x86)\Java\jre6\bin\jpeg.dll already loaded in another classloader at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at sun.security.action.LoadLibraryAction.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.image.JPEGImageDecoder.<clinit>(Unknown Source) at sun.awt.image.InputStreamImageSource.getDecoder(Unknown Source) at sun.awt.image.FileImageSource.getDecoder(Unknown Source) at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source) at sun.awt.image.ImageFetcher.fetchloop(Unknown Source) at sun.awt.image.ImageFetcher.run(Unknown Source) When I run it from an executable Jar file, it works fine, but after I wrapped it into an exe file, I got the above error, why ? How to fix it ?

    Read the article

  • Image processing: smart solution for converting superixel (128x128 pixel) coordinates needed

    - by zhengtonic
    Hi, i am searching for a smart solution for this problem: A cancer ct picture is stored inside a unsigned short array (1-dimensional). I have the location information of the cancer region inside the picture, but the coordinates (x,y) are in superpixel (128x128 unsigned short). My task is to highlight this region. I already solved this one by converting superpixel coordinates into a offset a can use for the unsigned short array. It works fine but i wonder if there is a smarter way to solve this problem, since my solution needs 3 nested for-loops. Is it possible to access the ushort array "superpixelwise", so i can navigate the ushort array in superpixels. ... // i know this does no work ... just to give you an idea what i was thinking of ... typedef struct { unsigned short[128x128] } spix; spix *spixptr; unsigned short * bufptr = img->getBuf(); spixptr = bufptr; ... best regards, zhengtonic

    Read the article

  • Error Reading Image

    - by javawarrior
    When I tried to open a simple smile.png image using package com.java3d.java3d.graphics; import java.awt.Color; import java.awt.image.BufferedImage; import java.io.File; import javax.imageio.ImageIO; public class Texture { public static Render floor = loadBitMap("smile.png"); public Texture(){} public static Render loadBitMap(String fileName) { try { BufferedImage image = ImageIO.read(Thread.currentThread().getContextClassLoader().getResource(fileName)); System.out.print(image==null); int width = image.getWidth(); System.out.println(width); int height = image.getHeight(); System.out.println(height); System.out.println(image.getRGB(4, 4)); Render result = new Render(width, height); image.getRGB(0, 0, width, height, result.pixels, 0, width); return result; } catch (Exception e) { System.out.println("CRASH!"); throw new RuntimeException(e); } } } it returns every pixel as -1; what could be causing this problem? Here is the image:

    Read the article

  • Image rotate opecv error

    - by avd
    When I use this code to rotate the image, the destination image size remains same and hence the image gets clipped. Please provide me a way/code snippet to resize accordingly (like matlab does in imrotate) so that image does not get clipped and outlier pixels gets filled with all white instead of black. void imrotate(std::string imgPath,std::string angleStr,std::string outPath) { size_t found1,found2; found1=imgPath.find_last_of('/'); found2=imgPath.size()-4; IplImage* src=cvLoadImage(imgPath.c_str(), -1);; IplImage* dst; dst = cvCloneImage( src ); int angle = atoi(angleStr.c_str()); CvMat* rot_mat = cvCreateMat(2,3,CV_32FC1); CvPoint2D32f center = cvPoint2D32f( src->width/2, src->height/2 ); double scale = 1; cv2DRotationMatrix( center, angle, scale, rot_mat ); cvWarpAffine( src, dst, rot_mat); char angStr[4]; sprintf(angStr,"%d",angle); cvSaveImage(string(outPath+imgPath.substr(found1+1,found2-found1-1)+"_"+angStr+".jpg").c_str(),dst); cvReleaseImage(&src); cvReleaseImage(&dst); cvReleaseMat( &rot_mat ); } Original Image: Rotated Image:

    Read the article

  • how to apply an animation into a triangle(Processing)

    - by dc_ou
    I want to create a simple animation, that can only show in a specific area, such as triange. I already have the animation, a rotating picture. but I dont know how to put it into the triangle. the function texture() can only apply images into a specific area. is there other ways to do that? thx!

    Read the article

  • How do i resolve method Overlapping in java/Processing [duplicate]

    - by user3718913
    This question already has an answer here: How do I compare strings in Java? 24 answers I have two methods/function in a class, called, Qestion1 and Question2, i want it in such a way that after the user has answered Question one correctly, the Question 2 method is called. Whenever i call the method 2, it displays both of them together instead exiting the first method first. Here's a dummy code to illustrate what i'm saying: void Question1() { String question="What is the capital of England?"; String Answer="London"; if(Answer=='London') { Question2(); } } void Question2() { String question="What is the capital of California?"; String Answer="Sacramento"; if(Answer=='Sacramento') { Question3(); } } Pls, this question is in no way related to that other question. Pls peruse the thread again.

    Read the article

  • Make a loop that draws lines in processing

    - by theolc
    I have this piece of code, and i am wondering how to make a loop that will draw these lines... Every 50 pixels on the x-axis... I am curious as to how this can be done and would like to use a loop rather than manually drawing each line! The following is the code for the lines... Please any help would be much appreciated! //set sidewalk fill(255,255,255); rect(0,490,500,10); line(50,490,50,500); line(100,490,100,500); line(150,490,150,500); line(200,490,200,500); line(250,490,250,500); line(300,490,300,500); line(350,490,350,500); line(400,490,400,500); line(450,490,450,500);

    Read the article

  • How do I create a background image on web page?

    - by kasha
    I am a new designer so hopefully this question isn't too basic! How do I create a background image on a webpage for a programmer? I designed the page in photoshop and I would like to know how to send the background image (the 25% opacity buildings overlay). I would be happy to send the main image (but it is too large and I imagine would slow the site and loading time drastically). here is the link to the design... http://problemio.com/home_page_1_1.pdf

    Read the article

  • how to apply the center of image view for another image view center

    - by maddy
    hi, I am developing image redraw app. i know the center of one image view which is having scaling property. i.e it can change it frame and center . that to be applied to another view center. when i apply center to newly formed Image view it giving wrong center because of the previous image view is having scaling property. so how can i get exact center to my new image view from previous imageview

    Read the article

  • mkisofs - Floppy Image to Disk Image

    - by CommunistPancake
    I'm trying to compile MikeOS on windows. I've successfully (I think) created a floppy (.flp) image of the operating system. I want to convert it to a disk image (.iso) so I can run it in virtual box. I've tried mkisofs -quiet -V 'MIKEOS' -input-charset iso8859-1 -o disk_images/mikeos.iso -b mikeos.flp disk_images/ Which is the command in the Linux build script. It does create an ISO image, but when I try to run in in VirtualBox, I get a black screen. What am I doing wrong? Here's my build script.

    Read the article

  • Convert color photos of documents to good black-and-white images?

    - by Norman Ramsey
    Since I don't have a copier or scanner, I'm using an 8 megapixel camera to copy documents. This works pretty well except they need a lot of processing afterward. I'd like to get from a photo to a bitmap, but using djpeg -grayscale -pnm photo.jpg | pgmtopbm -threshold -value XXX does not work so well, for two reasons: It's hard to guess what XXX should be, and XXX is different for different photos. Illumination varies, and sometimes a single threshold isn't what's right for the image. How can I do better? The ideal solution will be fully automatic command-line program that I can run on Linux. (I have already written a program to remove dark pixels from the edges of images.)

    Read the article

  • on hover overlay image in CSS

    - by Juventus
    I need a div with picture bg to overlay an image (with some amount transparency) when hovered on. I need to be able to have one transparent overlay that can be used and reused throughout the site on any image. My first attempt was round-about to say the least. Because I found out you cannot roll-over an invisible div I devised a sandwhich system in which the original image is the first layer, the overlay is the second layer, and the original image is third layer again. This way, when you roll-over, the original image disappears revealing the overlay image over the original image: http://www.nightlylabs.com/uploads/test.html So it works. Kinda. Because of you cannot interact with an visibility:invisible element (why?!) the roll-over flickers unless you rest the cursor on it. Any help? This method is bad so if anyone has a better one please comment.

    Read the article

  • How to Clear an image control in WPF (C#)

    - by antongladchenko
    I have an image control with a source image located in my c drive. I get a message that the image is being used by another process whenever I try to delete the original image to change it with another one dynamically. How do I release the image from the image control to be able to delete it. I tried this variants: string path = ((BitmapImage)img.Source).UriSource.LocalPath; img.SetValue(System.Windows.Controls.Image.SourceProperty, null); File.Delete(path); And: string path = ((BitmapImage)img.Source).UriSource.LocalPath; img.Source = null; File.Delete(path) But it's not work...

    Read the article

  • image loading information with jquery

    - by Pradyut Bhattacharya
    Hi I have a page which has a img holder with the html: - <img src="someimage.jpeg" alt="image" class="show_image"/> Now i m updating the image with jquery using the code... $('.show_image').attr('src', 'anotherimage.jpeg'); Now its working fine but i want to show the users the image is being loaded and may wait as the image size may be huge... Is there any method in jquery to get the information of percent loaded(bytes read/remaining) or if the image load is complete... Also how can i place a div over the image placeholder such that the div can fade the image(opacity:0.8) and add some text over the div as loading or something thanks

    Read the article

  • Help Reading Binary Image Data from SQL Server into PHP

    - by Joe Majewski
    I cannot seem to figure out a way to read binary data from SQL server into PHP. I am working on a project where I need to be able to store the image directly in the SQL table, not on the file system. Currently, I have been using a query like this one: INSERT INTO myTable(Document) SELECT * FROM OPENROWSET(BULK N'C:\image.jpg', SINGLE_BLOB) as BLAH This works fine to actually insert the image into the table, but I haven't yet figured a way to retrieve it and get my image back. I am doing this with PHP, and ultimately will have to make a stored procedure out of it, but can anyone enlighten me on a way to get that binary data (varbinary(MAX)) and generate an image on the fly. I expected it to be simple to use a SELECT statement and add a content-type to the headers that indicated it was an image, but it's simply not working. Instead, the page will just display the name of the file, which I have encountered in the past and understand it to be an error with the image data.

    Read the article

  • JJIL Android Java Problem

    - by Danny_E
    Hey Guys, Long time reader never posted until now. Im having some trouble with Android, im implementing a library called JJIL its an open source imaging library. My problem is this i need to run some analysis on an image and to do so i need to have it in jjil.core.image format and once those processes are complete i need to convert the changed image from jjil.core.image to java.awt.image. I cant seem to find a method of doing this does anyone have any ideas or have any experience with this? I would be grateful of any help. Danny

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >