Search Results

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

Page 12/964 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Processing a tab delimited file with shell script processing

    - by Lilly Tooner
    Hello, normally I would use Python/Perl for this procedure but I find myself (for political reasons) having to pull this off using a bash shell. I have a large tab delimited file that contains six columns and the second column is integers. I need to shell script a solution that would verify that the file indeed is six columns and that the second column is indeed integers. I am assuming that I would need to use sed/awk here somewhere. Problem is that I'm not that familiar with sed/awk. Any advice would be appreciated. Many thanks! Lilly

    Read the article

  • processing: convert int to byte

    - by inspectorG4dget
    Hello SO, I'm trying to convert an int into a byte in Processing 1.0.9. This is the snippet of code that I have been working with: byte xByte = byte(mouseX); byte yByte = byte(mouseY); byte setFirst = byte(128); byte resetFirst = byte(127); xByte = xByte | setFirst; yByte = yByte >> 1; port.write(xByte); port.write(yByte); According to the Processing API, this should work, but I keep getting an error at xByte = xByte | setFirst; that says: cannot convert from int to byte I have tried converting 128 and 127 to they respective hex values (0x80 and 0x7F), but that didn't work either. I have tried everything mentioned in the API as well as some other blogs, but I feel like I'm missing something very trivial. I would appreciate any help. Thank you.

    Read the article

  • How to write PIL image filter for plain pgm format?

    - by Juha
    How can I write a filter for python imaging library for pgm plain ascii format (P2). Problem here is that basic PIL filter assumes constant number of bytes per pixel. My goal is to open feep.pgm with Image.open(). See http://netpbm.sourceforge.net/doc/pgm.html or below. Alternative solution is that I find other well documented ascii grayscale format that is supported by PIL and all major graphics programs. Any suggestions? br, Juha feep.pgm: P2 # feep.pgm 24 7 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 3 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 15 15 15 0 0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 15 0 0 3 3 3 0 0 0 7 7 7 0 0 0 11 11 11 0 0 0 15 15 15 15 0 0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 0 0 0 3 0 0 0 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 edit: Thanks for the answer, I works... but I need a solution that uses Image.open(). Most of python programs out there use PIL for graphics manipulation (google: python image open). Thus, I need to be able to register a filter to PIL. Then, I can use any software that uses PIL. I now think mostly scipy, pylab, etc. dependent programs.

    Read the article

  • Asynchronous Processing in JBoss 6 ("Comet")

    - by chris_l
    edit: Retagged as tomcat, since this is really a question about the Tomcat embedded inside JBoss 6, rather than JBoss itself I have an extremely simple servlet, which works on Glassfish v3. It uses Servlet 3.0 Asynchronous Processing. Here's a simplified version (which doesn't do much): @WebServlet(asyncSupported=true) public class SimpleServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { final AsyncContext ac = request.startAsync(); ac.setTimeout(3000); } } On JBoss 6.0.0 (Milestone 2), I get the following Exception: java.lang.IllegalStateException: The servlet or filters that are being used by this request do not support async operation at org.apache.catalina.connector.Request.startAsync(Request.java:3096) at org.apache.catalina.connector.Request.startAsync(Request.java:3090) at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:990) at playcomet.SimpleServlet.doGet(SimpleServlet.java:18) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) ... Do I have to do anything special to enable Asynchronous Processing in JBoss 6? Or do I need an additional deployment descriptor? ...

    Read the article

  • How to center align background image in JPanel

    - by Jaguar
    I wanted to add background image to my JFrame. Background image means I can later add Components on the JFrame or JPanel Although I coudn't find how to add background image to a JFrame, I found out how to add background image to a JPanel from here: How to set background image in Java? This solved my problem, but now since my JFrame is resizable I want to keep the image in center. The code I found uses this method public void paintComponent(Graphics g) { //Draw the previously loaded image to Component. g.drawImage(img, 0, 0, null); //Draw image } Can anyone say how to align the image to center of the JPanel. As g.drawImage(img, 0, 0, null); provides x=0 and y=0 Also if there is a method to add background image to a JFrame then I would like to know. Thanks.

    Read the article

  • Best way to remove an object from an array in Processing

    - by cmal
    I really wish Processing had push and pop methods for working with Arrays, but since it does not I'm left trying to figure out the best way to remove an object at a specific position in an array. I'm sure this is as basic as it gets for many people, but I could use some help with it, and I haven't been able to figure much out by browsing the Processing reference. I don't think it matters, but for your reference here is the code I used to add the objects initially: Flower[] flowers = new Flower[0]; for (int i=0; i < 20; i++) { Flower fl = new Flower(); flowers = (Flower[]) expand(flowers, flowers.length + 1); flowers[flowers.length - 1] = fl; } For the sake of this question, let's assume I want to remove an object from position 15. Thanks, guys.

    Read the article

  • Audio processing in C# or C++

    - by melculetz
    Hi, I would like to create an application that uses AI techniques and allows the user to record a part of a song and then tries to find that song in a database of wav files. I would have liked to use some already existing libraries for the audio processing part. So, could you recommend any libraries in C# which can read a wav file, get input from microphone, have some audio filters (low pass, high pass, FFT etc) and maybe have the ability to plot the audio signal as well. I would prefer to develop in C#, but if there aren't good libraries for audio processing, I guess I could work in C++ as well. As far as I know, Mathlab already has the above mentioned functionalities, but I can't use it in my application.

    Read the article

  • Using glReadBuffer returns black image instead of the actual image only on Intel cards

    - by cloudraven
    I have this piece of code glReadBuffer( GL_FRONT ); glReadPixels( 0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, buffer ); Which works just perfectly in all the Nvidia and AMD GPUs I have tried, but it fails in almost every single Intel built-in video that I have tried. It actually works in a very old 945GME, but fails in all the others. Instead of getting a screenshot I am actually getting a black screen. If it helps, I am working with the Doom3 Engine, and that code is derived from the built-in screen capture code. By the way, even with the original game I cannot do screen capture on those intel devices anyway. My guess is that they are not implementing the standard correctly or something. Is there a workaround for this?

    Read the article

  • Play 2.0 RESTful request post-processing

    - by virtualeyes
    In regard to this question I am curious how one can do post-request REST processing a la (crude): def postProcessor[T](content: T) = { request match { case Accepts.Json() => asJson(content) case Accepts.Xml() => asXml(content) case _ => content } } overriding onRouteRequest in Global config does not appear to provide access to body of the response, so it would seem that Action composition is the way to go to intercept the response and do post-processing task(s). Question: is this a good idea, or is it better to do content-type casting directly within a controller (or other class) method where the type to cast is known? Currently I'm doing this kind of thing everywhere: toJson( i18n("account not found") ) toJson( Map('orderNum-> orderNum) ) while I'd like the toJson/toXml conversion to happen based on accepts header post-request.

    Read the article

  • how to display a image in java application

    - by Nubkadiya
    i want to display a image in my java application. i found a code to download the image from the webserver. what that code do is it takes the image and show it in the jframe. i want to use a label to show the image or soemthing else. so i can put it in my java application. can someone help me. it shouldnt be JFrame please help me here is my code Image image = null; try { URL url = new URL("http://www.personal.psu.edu/acr117/blogs/audrey/images/image-2.jpg"); image = ImageIO.read(url); } catch (IOException e) { } // Use a label to display the image JFrame frame = new JFrame(); JLabel lblimage = new JLabel(new ImageIcon(image)); frame.getContentPane().add(lblimage, BorderLayout.CENTER); frame.setSize(300, 400); frame.setVisible(true); } can someone help me

    Read the article

  • Using glReadBuffer/glReadPixels returns black image instead of the actual image only on Intel cards

    - by cloudraven
    I have this piece of code glReadBuffer( GL_FRONT ); glReadPixels( 0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, buffer ); Which works just perfectly in all the Nvidia and AMD GPUs I have tried, but it fails in almost every single Intel built-in video that I have tried. It actually works in a very old 945GME, but fails in all the others. Instead of getting a screenshot I am actually getting a black screen. If it helps, I am working with the Doom3 Engine, and that code is derived from the built-in screen capture code. By the way, even with the original game I cannot do screen capture on those intel devices anyway. My guess is that they are not implementing the standard correctly or something. Is there a workaround for this?

    Read the article

  • Create a Sin wave line with Processing

    - by Nintari
    Hey everybody, first post here, and probably an easy one. I've got the code from Processing's reference site: float a = 0.0; float inc = TWO_PI/25.0; for(int i=0; i<100; i=i+4) { line(i, 50, i, 50+sin(a)*40.0); a = a + inc; } http://processing.org/reference/sin_.html However, what I need is a line that follows the curve of a Sin wave, not lines representing points along the curve and ending at the 0 axis. So basically I need to draw an "S" shape with a sin wave equation. Can someone run me through how to do this? Thank you in advance, -Askee

    Read the article

  • Image over a Image

    - by rupesh
    Hi i want to put a Big image over a small Image , condition is the image which is on top has some specific rectangular area where the second image will be displayed. I want the the small Image to be displayed inside the big image not over the big image. i don't no will it possible or not , if it is possible can any one provide me guidance or provide me a sample code or link thanks alot

    Read the article

  • Jquery image blur effect with in a div?

    - by bala3569
    Consider i have three images and one bannerDiv.... On initial page load i should show the first image and after sometimeout say 300ms i must show the second image and vise versa.... I have to blur the first image and show second image .... Any suggestion how it can be done with jquery... <div Id="BannerDiv" style="display:none;"> <img src="mylocation" alt="image1"/> <img src="mylocation" alt="image2"/> <img src="mylocation" alt="image3"/> </div> and my jquery function is, <script type="text/javascript"> $(document).ready(function() { //how to show first image and blur it to show second image after 300 ms }); </script> EDIT: 1st image to fade out after 300ms and show 2nd image 2nd image to fade out after 300ms and show 3rd image 3rd image to fade out after 300ms and show 1st image....

    Read the article

  • What is the best algorithm to locate a point in an image file?

    - by suugaku
    Hi all, I want to create a mark sheet recognizer. Here is the description: My system uses black and white color scheme. The mark sheet paper has a small black rectangle on each corner and an additional small black rectangle, to determine orientation, near one of the previous rectangles. The paper is scanned to yield an image (in bmp format for example). The first step is to locate these five references in image as eficient as possible. My rough idea is to trace row by row and from left to right for each row. It sounds very slow I think. Is there any better way to do that? Thank you in advance. regards, Suugaku

    Read the article

  • Indexing community images for google image search

    - by Vittorio Vittori
    Hi, I'm trying to understand how can I do to let my site be reachable from google image search spiders. I like how last.fm solution, and I thought to use a technique like his staff do to let google find artists images on their pages. When I'm looking for an artist and I search it on google image search, as often as not I find an image from last.fm artists page, I make an example: If I search the band Pure Reason Revolution It brings me here, the artist's image page http://www.last.fm/music/Pure+Reason+Revolution/+images/4284073 Now if I take a look to the image file, i can see it's named: http://userserve-ak.last.fm/serve/500/4284073/Pure+Reason+Revolution+4.jpg so if I try to undertand how the service works I can try to say: http://userserve-ak.last.fm/serve/ the server who serve the images 500/ the selected size for the image 4284073/ the image id for database Pure+Reason+Revolution+4.jpg the image name I thought it's difficult to think the real filename for the image is Pure+Reason+Revolution+4.jpg for image overwrite problems when an user upload it, in fact if I digit: http://userserve-ak.last.fm/serve/500/4284073.jpg I probably find the real image location and filename With this tecnique the image is highly reachable from search engines and easily archived. My question is, does exist some guide or tutorial to approach on this kind of tecniques, or something similar?

    Read the article

  • Prepare community images for google image search indexing

    - by Vittorio Vittori
    Hi, I'm trying to understand how can I do to let my site be reachable from google image search spiders. I like how last.fm solution, and I thought to use a technique like his staff do to let google find artists images on their pages. When I'm looking for an artist and I search it on google image search, as often as not I find an image from last.fm artists page, I make an example: If I search the band Pure Reason Revolution It brings me here, the artist's image page http://www.last.fm/music/Pure+Reason+Revolution/+images/4284073 Now if I take a look to the image file, i can see it's named: http://userserve-ak.last.fm/serve/500/4284073/Pure+Reason+Revolution+4.jpg so if I try to undertand how the service works I can try to say: http://userserve-ak.last.fm/serve/ the server who serve the images 500/ the selected size for the image 4284073/ the image id for database Pure+Reason+Revolution+4.jpg the image name I thought it's difficult to think the real filename for the image is Pure+Reason+Revolution+4.jpg for image overwrite problems when an user upload it, in fact if I digit: http://userserve-ak.last.fm/serve/500/4284073.jpg I probably find the real image location and filename With this tecnique the image is highly reachable from search engines and easily archived. My question is, does exist some guide or tutorial to approach on this kind of tecniques, or something similar?

    Read the article

  • Prepare your site images for google image search indexing

    - by Vittorio Vittori
    Hi, I'm trying to understand how can I do to let my site be reachable from google image search spiders. I like how last.fm solution, and I thought to use a technique like his staff do to let google find artists images on their pages. When I'm looking for an artist and I search it on google image search, as often as not I find an image from last.fm artists page, I make an example: If I search the band Pure Reason Revolution It brings me here, the artist's image page http://www.last.fm/music/Pure+Reason+Revolution/+images/4284073 Now if I take a look to the image file, i can see it's named: http://userserve-ak.last.fm/serve/500/4284073/Pure+Reason+Revolution+4.jpg so if I try to undertand how the service works I can try to say: http://userserve-ak.last.fm/serve/ the server who serve the images 500/ the selected size for the image 4284073/ the image id for database Pure+Reason+Revolution+4.jpg the image name I thought it's difficult to think the real filename for the image is Pure+Reason+Revolution+4.jpg for image overwrite problems when an user upload it, in fact if I digit: http://userserve-ak.last.fm/serve/500/4284073.jpg I probably find the real image location and filename With this tecnique the image is highly reachable from search engines and easily archived. My question is, does exist some guide or tutorial to approach on this kind of tecniques, or something similar?

    Read the article

  • live image edit , and crop

    - by 422
    I was just thinking, which is always dangerous. We use Valums Image uploader. Aside from that, I am looking for an inline image editor, but with a difference. User uploads an image ( lets say 800 x 600 ) Our system wants to see the image ( 170 x 32 ) now I know we can use php to resize images. But I was thinking, does anyone know of a system, where we can display the image, and user can scale, and crop image ( with say a predefined overlay ) By that they scale down to nearest acceptable size, and then click crop tool, which shows a div overlay with say 70% transparency that they can drag over the image, and then click crop. So image is cropped to exact size we need, then can save . I am sure I have seen some jquery stuff done like this, just cannot for life of me find it. Essentialy, we would like to offer a simple client side image processor, thats lightweight, and then the ability to save what they did . Sorry no code to show, as its more of a request. Regards

    Read the article

  • image transistion

    - by Jeff Main
    Hi all. I've gotten stuck again. I've got an image (album cover) that I'll be changing in code behind, and wish to basicaly do the following. When a new album cover image is determine and aquired, I want the current image in the image control to fade out, get updated with the new cover, and then fade back in. I'm not seeing very many good examples on how to accomplish this in code behind. The following was my latest failed attempt... if (currentTrack != previousTrack) { BitmapImage image = new BitmapImage(); image.BeginInit(); image.CacheOption = BitmapCacheOption.OnLoad; image.CreateOptions = BitmapCreateOptions.IgnoreImageCache; image.UriSource = new Uri(Address, UriKind.Absolute); image.EndInit(); Storyboard MyStoryboard = new Storyboard(); DoubleAnimation FadeOut = new DoubleAnimation(); FadeOut.From = 1.0; FadeOut.To = 0.0; FadeOut.Duration = new Duration(TimeSpan.FromSeconds(.5)); MyStoryboard.Children.Add(FadeOut); Storyboard.SetTargetName(FadeOut, CoverArt.Name); Storyboard.SetTargetProperty(FadeOut, new PropertyPath(Rectangle.OpacityProperty)); CoverArt.Source = image; DoubleAnimation Fadein = new DoubleAnimation(); Fadein.From = 0.0; Fadein.To = 1.0; Fadein.Duration = new Duration(TimeSpan.FromSeconds(.5)); MyStoryboard.Children.Add(Fadein); Storyboard.SetTargetName(Fadein, CoverArt.Name); Storyboard.SetTargetProperty(Fadein, new PropertyPath(Rectangle.OpacityProperty)); MyStoryboard.Begin(this); } I'd prefer to do this in code behind simply because that is where I'm aquiring the image. Otherwise, I'm not sure how I'd trigger it. An example would be greatly appriciated. Thanks.

    Read the article

  • Getting started with character and text processing (encoding, regular expressions)

    - by TK
    I'd like to learn foundations of encodings, characters and text. Understanding these is important for dealing with a large set of text whether that are log files or text source for building algorithms for collective intelligence. My current knowledge is pretty basic: something like "As long as I use UTF-8, I'm okay." I don't say I need to learn about advanced topics right away. But I need to know: Bit and bytes level knowledge of encodings. Characters and alphabets not used in English. Multi-byte encodings. (I understand some Chinese and Japanese. And parsing them is important.) Regular expressions. Algorithm for text processing. Parsing natural languages. I also need an understanding of mathematics and corpus linguistics. The current and future web (semantic, intelligent, real-time web) needs processing, parsing and analyzing large text. I'm looking for some resources (maybe books?) that get me started with some of the bullets. (I find many helpful discussion on regular expressions here on Stack Overflow. So, you don't need to suggest resources on that topic.)

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >