I am using opencv to process very large images (some times even more than 2500x2000). When I display such an image using a normal cvNamedWindow it occupies the whole screen and even I am unable to scroll down or sideways to see other parts. Is it possible to reduce the size of image only while displaying?
Note: the size of my images are not constant
platform used : visual studio
You have to use the flag CV_WINDOW_NORMAL to alter this behavior. This flag will make the window manually-resizable.
cvNamedWindow(yourWindowName, CV_WINDOW_NORMAL);
i don't know whether any in-built function is available to do that or not, but i can suggest u to write ur own image processing function for displaying the generated image... which takes only alternate rows and column information for display that wud reduce the image to 1250X1000, so depending on ur need u can take every 3rd row or column if u want the size to be further less... This wud give a hit to the performance as per displaying time as temporary images wud need to be generated but wud give u the desired results.
Related
I’m using the mailmerge feature of Gembox.Document to produce reports.
I’m having issues with the sizing of a picture.
I have created a merge field inside a table cell, and I would like the picture to occupy the maximum of the cell size without changing it’s aspect ratio.
For now it’s inserting the picture, but the ratio is all messed up.
I’ve read in the help page that I could put a shape my merge field but after many attempts I don’t know how to do it, when I try to draw the shape in my word template, it doesn’t go inside my merge field.
Can anybody help me with this ? Either to fix the aspect ratio, or how to use the shape…
Cheers
Take a look at the second Merge Pictures example, its input "MergePicturesWithTemplates.docx" file has MergeFields with Shapes inside.
To place a Shape inside a MergeField, draw the shape, set it as "In Line with Text", and drag it inside the field.
Now that you have a shape as a placeholder for your image, you can add switches to MergeField in order to keep the aspect ratio of the merged picture:
\x - resize resulting picture horizontally, keep the template shape's height.
\y - resize resulting picture vertically, keep the template shape's width.
\x \y - resize resulting picture either horizontally or vertically.
To add a switch, press ALT + F9 in MS Word, that will reveal field's code and then write the switch within.
I am trying to load dataset during initialization of the JFreeChart. But every time I tried to create a dataset with higher "number of item per series", the more data (all data) displayed visible in the chart (the bigger the dataset, the smaller the graph). But actually what I wanted is to have the fixed range of dataset values displayed on the chart while the rest is still hidden. Just the same way the data would normally be displayed in the actual trading platform, let's say Metatrader (MT4). First time when I open the chart I can see the screen filled with the only visible dataset of the chart and if I left-scroll the chart I will be able to see the old/history dataset as well. Does anyone have idea how to achieve this using JFreechart?
Really appreciate for any help or any thing/articles I can refer. Thanks so much!
You can use setRange() on either the domain or range axis, as shown in this fragment. If you've already tried this, it may help to edit your question to include an sscce and/or image that exhibits any problems you encountered.
I have question to GTK users, in my program I will need a lot of images and I wonder if I can somehow connect iconview with images? Because some of these images are going to be big and I want to show ther dwarfs in one window and full size in another. Or do I have to use table and then making small icons from images, place them inside table, save somewhere original dimensions and then just restore original dimensions in that another window where I want to have full dimensions of pictures?
Sorry for bothering and thanks in advance.
You have to first load the image manually (using gdk_pixbuf_new_from_file() or gdk_pixbuf_new_from_file_at_size()). Then manually create the different sizes you need (using gdk_pixbuf_scale() or gdk_pixbuf_scale_simple()). To add the images to the icon view you have to create a 'GtkListStore' (or any other object implementing the GtkTreeModel interface) and add your scaled down pixbuf to it. It would be a good idea to do this in a separate thread since it will probably take some time for the images to load and you don't want your application to lock up.
I'm working on a simple image gallery project and I'd like to implement the ability to search based on a color hex code. So if someone enters 'ff1212' into the search, it will display only those images that contain that particular shade of red. I've seen a website that has a search that works the way I want: http://cssline.com (the AJAX part is nice, but its the server-side stuff I'm after).
I can't figure out how to store the color data from each image. Should I get each unique hex code used in an image and store them as tags in a database? It seems like this would create a huge dataset which would slow down the search. What about storing the images themselves in the database and scanning their colors during the search? That also sounds like it would be slow. I know that once I figure out how to store the data for speedy searching I can figure out how to code the search itself.
Does anybody have any tips or advice that can help me?
First of all, bring the number of colors in the images down to an amount that is workable (max 16 or so).
Then, to be able to compare different images, i think it's a good idea to store only websafe values (the intervals #erelander was talking about) to normalize the results.
You may try storing color intervals of each image in a database rather than storing each unique color value. Of course, searching these intervals may require a different search algorithm.
I dont think that storing color values in database will make it slow. It will, although, make it insanely large! And given that you can index data on color values, the process will be fast.
I have a ListBox of images. I want to know the number of times the same image has been added to that ListBox. Any solutions?
If you want to check that the image itself, regardless of the file name, is not repeated then generate an MD5 checksum for the image data and store that.
If you want to make sure that the two are always linked then either tag it onto the end of the file or create a class which holds the image and the checksum together.
The MD5 check can be used to differentiate any data file, even different versions of the same file if the content is in anyway different.