|
I am trying to take the imageData of image in this where w= width of image and h = height of image
for (int i = x; i < x+h; i++) //height of frame pixels { for (int j = y; j < y+w; j++)//width of frame pixels { int pos = i * w * Channels + j; //...
Started by konidela on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
From the code you've posted your problem lies in your position variable, you'd want something like int pos = i*w*Channels + j*Channels , then you can access the... .
See good explanation here on multiple methods for accessing pixels in an IplImage in OpenCV .
|
|
I would like to create a image uploading service (yes, i am aware of imageshack, photobucket, flickr...etc) :)
I have seen only imageshack show the directory names ("img294", "1646") of where the image is located, in the same way - i would like to do ...
Started by Abs on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Be easy to prevent duplicate image names conflicting on your server as well, you can gather as many as well to aid in a method of duplicate image detection, which could save you disk space as well.
|
|
I have a site that creates images for some bit of content after the content is created. I'm trying to figure out what to do in between the time the content is created and the image is created. My thought is that I might be able to set a custom image to...
Started by Tracy Hurley on
, 6 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
<P> <!-- First" type="application/mpeg"> <!-- Else, try the GIF image --> <OBJECT data="TheEarth.gif" type="image/gif"> <!-- Else ....
Use the <object> tag in HTML with a fallback to the default image.
|
Ask your Facebook Friends
|
What is the difference between "image/png" and "image/x-png"?
Started by Aaron Bush on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
New Content-Transfer- are nonstandard
So my guess is "image/x-png" is probably leftover from the days when png was pretty new, and as such, not standardized....
That image/x-png would have been PNG before the MIME type was standardized.
|
|
I wrote a simple javascript image rotator which picks a random image on each page load. The issue is that if i use a default image, that default image will show up for a second before the javascript loads and replaces it. Obviously if someone has javascript...
Started by Galen on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You can then install an onload handler on the image and change its source to your random....
If you hide the default image as the first thing you do when the page loads, there probably won't be a chance for the users to see the image.
|
|
For dvipng, the -D option increases the dpi of the image but also increases the image size, and the -Q option improves antialiasing but doesn't do enough. Is there a way to increase the image resolution and quality without increasing image size?
Started by Heinrich Schmetterling on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The external program will probably do.
I would suggest that you use -D and -Q , and then post-process the generated image using imagemagick's mogrify or something similar to scale the image back.
|
|
I have an object of type IMAGE which holds image. I wanted to display the image in MVC view along with other controls. The way i can think of is to temporary store image on disk and set src of img control. I am sure there would be better way of doing ...
Started by Balaji on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You can....
In your page you to temporarily write to disk.
For instance, you have http://myapp/media.ashx?imageId=10 stream out the image.
You can write a handler to stream images out and then reference the streamer in your image tag.
|
|
How do you detect the location of an image within a larger image? I have an unmodified copy of the image. This image is then changed to an arbitrary resolution and placed randomly within a much larger image which is of an arbitrary size. No other transformations...
Started by The Rook on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
There is a quick and dirty solution, and that's simply sliding a window over the target image the image is there and that's the location; if the score is below the threshold, then the image original image multiple times ....
|
|
I want to convert a Pyglet.AbstractImage object to an PIL image for further manipulation here are my codes
from pyglet import image from PIL import Image pic = image.load('pic.jpg') data = pic.get_data('RGB', pic.pitch) im = Image.fromstring('RGB', (pic...
Started by lilo on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I think I find the solution there is a codec function to encode the Pyglet image to PIL here is the link to the source
so the code above should be modified to this
from pyglet....
This is an open wishlist item:
AbstractImage to/from PIL image.
|
|
I am looking for the best way to detect an image within another image. I have a small image and would like to find the location that it appears within a larger image - which will actually be screen captures. Conceptually, it is like a 'Where's Waldo?'...
Started by dmanxiii on
, 4 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The algorithm you want is on wikipedia: http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_....
You would need also to use a special character in a similar vein to a linebreak, to denote the image boundary.
String is the image.
|