Search Results

Search found 5147 results on 206 pages for '3ds max'.

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

  • OpenCv Error ( unhandeld exeption) after execute

    - by hamza
    Hi , i m using VS2010 i m trting to make a gray image more bright , the code did compile normaly but no change in the seconde picture , and an error message ( undhadled exeception .. .. ) showed up after that the execute is done showed up here is a peace of my code : int main(int argc, _TCHAR* argv[]) { IplImage *img = cvLoadImage("mra.jpg"); if (!img) { printf("Error: Couldn't open the image file.\n"); return 1; } //IplImage* new_image = getlargersize(img); double Min , Max ; Min = Max = 0 ; Max_Min (img , &Min , &Max); cout<<"the max value in the picture is :"<<Min<<" and the minimum value is :"<<Max<<endl ; IplImage* img2 = eclaircir(Min ,Max ,img); cvNamedWindow("Image:", CV_WINDOW_AUTOSIZE); cvNamedWindow("Image2:", CV_WINDOW_AUTOSIZE); cvShowImage("Image2:", img2); cvShowImage("Image:", img); cvWaitKey(0); cvDestroyWindow("Image2:"); cvDestroyWindow("Image:"); cvReleaseImage(&img2); cvReleaseImage(&img); return 0; } void Max_Min(IplImage* temp , double *min , double *max ){ CvScalar pix ; for (int i = 0 ; i < temp->height ; i++){ for (int j = 0 ; j < temp->width ; j++){ pix = cvGet2D(temp , i , j); if ( pix.val[0] >= *max ){ *max = pix.val[0]; } if ( pix.val[0] <= *min){ *min = pix.val[0]; } } } } IplImage* eclaircir (double min , double max , IplImage* image){ double temp = max - min ; CvScalar pix ; for (int i = 0 ; i < image->height ; i++){ for (int j = 0 ; j < image->width ; j++){ pix = cvGet2D(image , i , j); pix.val[0] = ( pix.val[0] - min)*255 ; pix.val[0] = pix.val[0]/temp ; cvSet2D(image , i , j , pix ); } } return image ; } thanks

    Read the article

  • Linux AMD-FX 8350 temperature monitoring

    - by HyperDevil
    I’m trying to get the CPU temperature for my AMD-FX8350 on Debian Squeeze. I ran sensors-detect and then sensors, but I only get my motherboard sensors (it8720-isa-0228). There are three temperature values there but I assume those are not for the CPU. it8720-isa-0228 Adapter: ISA adapter in0: +1.36 V (min = +0.00 V, max = +4.08 V) in1: +1.50 V (min = +0.00 V, max = +4.08 V) in2: +3.38 V (min = +0.00 V, max = +4.08 V) in3: +2.93 V (min = +0.00 V, max = +4.08 V) in4: +3.07 V (min = +0.00 V, max = +4.08 V) in5: +4.08 V (min = +0.00 V, max = +4.08 V) in6: +4.08 V (min = +0.00 V, max = +4.08 V) in7: +2.93 V (min = +0.00 V, max = +4.08 V) Vbat: +3.01 V fan1: 3375 RPM (min = 10 RPM) fan2: 0 RPM (min = 0 RPM) fan3: 1730 RPM (min = 10 RPM) fan5: 0 RPM (min = 0 RPM) temp1: +27.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor temp2: +53.0°C (low = +127.0°C, high = +127.0°C) sensor = thermal diode temp3: +65.0°C (low = +127.0°C, high = +90.0°C) sensor = thermal diode cpu0_vid: +0.000 V Is there anything I am missing? I also loaded the K8temp and K10temp modules and ran sensor-detect without any results. I do see this message in dmesg: hwmon-vid: Unknown VRM version of your x86 CPU

    Read the article

  • How can I test that my hash function is good in terms of max-load?

    - by philcolbourn
    I have read through various papers on the 'Balls and Bins' problem and it seems that if a hash function is working right (ie. it is effectively a random distribution) then the following should/must be true if I hash n values into a hash table with n slots (or bins): Probability that a bin is empty, for large n is 1/e. Expected number of empty bins is n/e. Probability that a bin has k collisions is <= 1/k!. Probability that a bin has at least k collisions is <= (e/k)**k. These look easy to check. But the max-load test (the maximum number of collisions with high probability) is usually stated vaguely. Most texts state that the maximum number of collisions in any bin is O( ln(n) / ln(ln(n)) ). Some say it is 3*ln(n) / ln(ln(n)). Other papers mix ln and log - usually without defining them, or state that log is log base e and then use ln elsewhere. Is ln the log to base e or 2 and is this max-load formula right and how big should n be to run a test? This lecture seems to cover it best, but I am no mathematician. http://pages.cs.wisc.edu/~shuchi/courses/787-F07/scribe-notes/lecture07.pdf BTW, with high probability seems to mean 1 - 1/n.

    Read the article

  • Exclude specific value from a Min/Max agregate funcion using ICriteria.

    - by sparks
    I have a schedule (Voyages) table like this: ID Arrival Departure OrderIndex 1 01/01/1753 02/10/2009 0 1 02/11/2009 02/15/2009 1 1 02/16/2009 02/19/2009 2 1 02/21/2009 01/01/1753 3 2 01/01/1753 03/01/2009 0 2 03/04/2009 03/07/2009 1 2 03/09/2009 01/01/1753 2 By design i save '01/01/1753' as a default value if the user doesn't fill a the field on the capture screen and for the very first Arrival and the very last Departure which are never provided. Im using Nhibernate and Criteria, and im wondering whats the best way to query this data if i want to know the First departure and last arrival for each voyage in the table. My first thought was a groupby (ID) and then do some Min and Max with the arrival and departure but the `'01/01/1753' VALUE is messing aronud. ... .SetProjection(Projections.ProjectionList() .Add(Projections.GroupProperty("ID"), "ID") .Add(Projections.Min("DepartureDate"), "DepartureDate") .Add(Projections.Max("ArrivalDate"), "ArrivalDate") ) ... So is there a way to skip this value in the Min function comparison (without losing the whole row of data), or there is a better way to do this, maybe utilizing the OrderIndex that always indicate the correct order of the elements, maybe ordering ASC taking the 1st and then Order DESC and taking the 1 st again, but im not quite sure how to do that with criteria syntax.

    Read the article

  • Mobile detection - Meta tag and max-device-width vs. php user agent?

    - by nimmbl
    Which form of mobile detection should I use and why? <meta name="viewport" content="width=320,initial-scale=1,maximum-scale=1.0,user-scalable=no" /> <link media="only screen and (max-device-width: 480px) and (min-device-width: 320px)" href="css/mobile.css" type= "text/css" rel="stylesheet"> <link media="handheld, only screen and (max-device-width: 319px)" href="css/mobile_simple.css" type="text/css" rel="stylesheet" /> Or include('mobile_device_detect.php'); $mobile = mobile_device_detect(); And why on earth would this: <?php if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== false) { ?> <meta name="viewport" content="width=320,initial-scale=1,maximum-scale=1.0,user-scalable=no" /> <link media="screen" href="css/mobile.css" type= "text/css" rel="stylesheet"> <?php } else { ?> <link media="screen" href="css/mobile_simple.css" type= "text/css" rel="stylesheet"> <?php } ?> ignore this css? body { background: -webkit-gradient(linear, left top, left bottom, from(#555), to(#000)); }

    Read the article

  • Is it possible to achieve MAX(As,Ad) openGL blending?

    - by Jeff B
    I am working on a game where I want to create shadows under a series of sprites on a grid. The shadows are larger than the sprites themselves and the sprites are animated (i.e. move and rotate). I cannot simply render them into the sprite png, or the shadows will overlap adjacent sprites. I also cannot simply put shadows on a lower layer by themselves, because when they overlap, they will create dark bands at their intersection. These sprites are animated, so it is not feasible to render these en masse. Basically, I want the sprites' shadows to blend together such that they max out at a set opacity. Example: I believe this is equivalent to an openGL blending of (Rs,Gs,Bs,Max(As,Ds)), where I don't really care about R,G, and B, as it will always be the same color in src and dst. However, this is not a valid openGL blending mode. Is there an easy way to accomplish this, especially in cocos2d-iphone? I would be able to approximate this by making the shadow sprites opaque, then applying them both to a parent sprite, and making the parent sprite 40% opacity. However, the way cocos2d works, this only sets the opacity of each child to 40%, rather than the combined sprite image, which results in the same stripe.

    Read the article

  • how to pull and display range (min-max) data for each page in pagination?

    - by Ty W
    I have a table of data that is searchable and sortable, but likely to produce hundreds or thousands of results for broad searches. Assuming the user searches for "foo" and sorts the foos in descending price order I'd like to show a quick-jump select menu like so: <option value="1">Page 1 ($25,000,000 - $1,625,000)</option> <option value="2">Page 2 ($1,600,000 - $1,095,000)</option> <option value="3">Page 3 ($1,095,000 - $815,000)</option> <option value="4">Page 4 ($799,900 - $699,000)</option> ... Is there an efficient way of querying for this information directly from the DB? I've been grabbing all of the matching records and using PHP to calculate the min and max value for each page which seems inefficient and likely to cause scaling problems. The only possible technique I've been able to come up with is some way of having a calculated variable that increments every X records (X records to a page), grouping by that, and selecting MIN/MAX for each page grouping... unfortunately I haven't been able to come up with a way to generate that variable.

    Read the article

  • Reducing Time Complexity in Java

    - by Koeneuze
    Right, this is from an older exam which i'm using to prepare my own exam in january. We are given the following method: public static void Oorspronkelijk() { String bs = "Dit is een boodschap aan de wereld"; int max = -1; char let = '*'; for (int i=0;i<bs.length();i++) { int tel = 1; for (int j=i+1;j<bs.length();j++) { if (bs.charAt(j) == bs.charAt(i)) tel++; } if (tel > max) { max = tel; let = bs.charAt(i); } } System.out.println(max + " keer " + let); } The questions are: what is the output? - Since the code is just an algorithm to determine the most occuring character, the output is "6 keer " (6 times space) What is the time complexity of this code? Fairly sure it's O(n²), unless someone thinks otherwise? Can you reduce the time complexity, and if so, how? Well, you can. I've received some help already and managed to get the following code: public static void Nieuw() { String bs = "Dit is een boodschap aan de wereld"; HashMap<Character, Integer> letters = new HashMap<Character, Integer>(); char max = bs.charAt(0); for (int i=0;i<bs.length();i++) { char let = bs.charAt(i); if(!letters.containsKey(let)) { letters.put(let,0); } int tel = letters.get(let)+1; letters.put(let,tel); if(letters.get(max)<tel) { max = let; } } System.out.println(letters.get(max) + " keer " + max); } However, I'm uncertain of the time complexity of this new code: Is it O(n) because you only use one for-loop, or does the fact we require the use of the HashMap's get methods make it O(n log n) ? And if someone knows an even better way of reducing the time complexity, please do tell! :)

    Read the article

  • how do i ininitialize a float to it's max/min value?

    - by Faken
    How do i hard code an absolute maximum or minimum value for a float or double? I want to search out the max/min of an array by simply iterating through and catching the largest. There are also positive and negative infinity for floats, should i use those instead? if so, how do i denote that in my code?

    Read the article

  • how do I initialize a float to its max/min value?

    - by Faken
    How do I hard code an absolute maximum or minimum value for a float or double? I want to search out the max/min of an array by simply iterating through and catching the largest. There are also positive and negative infinity for floats, should I use those instead? If so, how do I denote that in my code?

    Read the article

  • Magento - How to select mysql rows by max value?

    - by Damodar Bashyal
    mysql> SELECT * FROM `log_customer` WHERE `customer_id` = 224 LIMIT 0, 30; +--------+------------+-------------+---------------------+-----------+----------+ | log_id | visitor_id | customer_id | login_at | logout_at | store_id | +--------+------------+-------------+---------------------+-----------+----------+ | 817 | 50139 | 224 | 2011-03-21 23:56:56 | NULL | 1 | | 830 | 52317 | 224 | 2011-03-27 23:43:54 | NULL | 1 | | 1371 | 136549 | 224 | 2011-11-16 04:33:51 | NULL | 1 | | 1495 | 164024 | 224 | 2012-02-08 01:05:48 | NULL | 1 | | 2130 | 281854 | 224 | 2012-11-13 23:44:13 | NULL | 1 | +--------+------------+-------------+---------------------+-----------+----------+ 5 rows in set (0.00 sec) mysql> SELECT * FROM `customer_entity` WHERE `entity_id` = 224; +-----------+----------------+---------------------------+----------+---------------------+---------------------+ | entity_id | entity_type_id | email | group_id | created_at | updated_at | +-----------+----------------+---------------------------+----------+---------------------+---------------------+ | 224 | 1 | [email protected] | 3 | 2011-03-21 04:59:17 | 2012-11-13 23:46:23 | +-----------+----------------+---------------------------+----------+--------------+----------+-----------------+ 1 row in set (0.00 sec) How can i search for customers who hasn't logged in for last 10 months and their account has not been updated for last 10 months. I tried below but failed. $collection = Mage::getModel('customer/customer')->getCollection(); $collection->getSelect()->joinRight(array('l'=>'log_customer'), "customer_id=entity_id AND MAX(l.login_at) <= '" . date('Y-m-d H:i:s', strtotime('10 months ago')) . "'")->group('e.entity_id'); $collection->addAttributeToSelect('*'); $collection->addFieldToFilter('updated_at', array( 'lt' => date('Y-m-d H:i:s', strtotime('10 months ago')), 'datetime'=>true, )); $collection->addAttributeToFilter('group_id', array( 'neq' => 5, )); Above tables have one customer for reference. I have no idea how to use MAX() on joins. Thanks UPDATE: This seems returning correct data, but I would like to do magento way using resource collection, so i don't need to do load customer again on for loop. $read = Mage::getSingleton('core/resource')->getConnection('core_read'); $sql = "select * from ( select e.*,l.login_at from customer_entity as e left join log_customer as l on l.customer_id=e.entity_id group by e.entity_id order by l.login_at desc ) as l where ( l.login_at <= '".date('Y-m-d H:i:s', strtotime('10 months ago'))."' or ( l.created_at <= '".date('Y-m-d H:i:s', strtotime('10 months ago'))."' and l.login_at is NULL ) ) and group_id != 5"; $result = $read->fetchAll($sql); I have loaded full shell script to github https://github.com/dbashyal/Magento-ecommerce-Shell-Scripts/blob/master/shell/suspendCustomers.php

    Read the article

  • How to modify the attributes by putting dynamic node paths

    - by sam
    I have a code that selects all elements and their child nodes DECLARE @x XML DECLARE @node_no int DECLARE @count int DECLARE @max INT, @i INT EXECUTE return_xml '1', NULL, @x output Declare @temp Table ( id int not null identity(1,1), ParentNodeName varchar(max), NodeName varchar(max), NodeText varchar(max) ) INSERT INTO @temp SELECT t.c.value('local-name(..)', 'varchar(max)') AS ParentNodeName, t.c.value('local-name(.)', 'varchar(max)') AS NodeName, t.c.value('text()[1]', 'varchar(max)') AS NodeText FROM @x.nodes('/booking//*') AS t(c) select * from @temp Now I want to modify the attributs by putting dynamic node paths SET @x.modify (' insert attribute MyId {sql:variable("@i")} as first into (ParentNodeName/NodeName::*[position() = sql:variable("@i")])[1] ') where id = id of temp table any Idea how can I modify my whole xml this way as I am having a untyped xml and have to add an attribute in every node

    Read the article

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