mercredi 1 avril 2015

How to stop the ImageJ result window from popping up when running a macro in batch mode?

I'm trying to compute some overall results for a folder full of image stacks using a self-written macro. For each image in each stack, a "Results" window will pop up, before it gets closed by the run("Close") function, even though the macro is run in batch mode. That is completely annoying, because my whole screen is blinking from the windows popping up and getting closed and I can't really work on anything else while the script is running.


Does anyone have an idea how to solve that problem? I'll be happy about any advice that may lead to any improvement...


Best, Nasrin


$_FILES empty after multiple files upload

i am trying to upload multiple files to a mysql database.


Everything works fine untill i surpass around 7 to 8 MB. A lot of internet reactions say it should have something to do with the php.ini settings, so i've tried to check them. My php version is 5.2.17 code below:



<?php include_once "mysql.php"; ?>
<body>
<form action="" method="post" enctype="multipart/form-data">
<label for="album">Album</label>
<input type="text" id="album" name="album" /><br>
<label for="fotos">Foto's</label>
<input type="file" id="files" name="files[]" multiple accept="image/*" />
<input type="submit" value="Upload" />
</form>

<?php
echo "<br>upload_max_filesize: ".ini_get('upload_max_filesize');
echo "<br>post_max_size: ".ini_get('post_max_size');
echo "<br>memory_limit: ".ini_get('memory_limit');
echo "<br>realpath_cache_size: ".ini_get('realpath_cache_size');
echo "<br>realpath_cache_ttl: ".ini_get('realpath_cache_ttl');
$valid_formats = array("jpg", "png", "gif", "bmp");
$max_file_size = 6291456; //6MB
$count = 0;
$mysql = new MySQL; //own class
$mysql->db_connect();


if(isset($_POST) and $_SERVER['REQUEST_METHOD'] == "POST"){
// Loop $_FILES to exeicute all files
foreach ($_FILES['files']['name'] as $index => $name)
{
echo $index;
$fotos[$index]['album'] = $_POST['album'];
$fotos[$index]['name'] = $_FILES['files']['name'][$index];
$fotos[$index]['type'] = $_FILES['files']['type'][$index];
$fotos[$index]['tmp_name'] = $_FILES['files']['tmp_name'][$index];
$fotos[$index]['error'] = $_FILES['files']['error'][$index];
$fotos[$index]['size'] = intval($_FILES['files']['size'][$index]);
}

foreach ($fotos as $foto)
{
if($foto['error'] == 0)
{
if($foto['size'] < $max_file_size)
{
$fp = fopen($foto['tmp_name'], 'r');
$content = fread($fp, filesize($foto['tmp_name']));
$content = addslashes($content);
fclose($fp);
$mysql->qry("INSERT INTO albums (`album`, `type`, `name`, `img` ) VALUES ('".$foto['album']."', '".$foto['type']."', '".$foto['name']."', '".$content."')");
}
else
{
echo "File to big<br>";
echo "file: ".$foto['size']." < Max: ".$max_file_size."<br>";
}
}
else
{
echo "errorcode: ".$fotos['error'] . "<br>";
}
}

$mysql->close();


echo "<pre>";
print_r($fotos);
echo "</pre>";
}
?>
</body>


my output of ini_get is



  • upload_max_filesize: 128M

  • post_max_size: 128M

  • memory_limit: 256M

  • realpath_cache_size: 4M

  • realpath_cache_ttl: 120


C++ Place an image on top of another image in a certain location

I'm looking for a way to place on image on top of another image at a set location.


I have been able to place images on top of each other using cv::addWeighted but when I searched for this particular problem, there wasn't any posts that I could find relating to C++.


Quick Example:


200x200 Red Square & 100x100 Blue Square


enter image description here & enter image description here


Blue Square on the Red Square at 70x70 (From top left corner Pixel of Blue Square)


enter image description here


Getting intensity value for all pixels in an image

I have to create an algorithm to determine a dark "grayscale image" in matlab, so I have to collect all pixels' intensity value then evaluate that if 65% of all pixels in that particular image is lesser than 100 then it is dark.


the question is how to collect/get these value to create an algorithm like this?


Pasting multiple images from the clipboard into PowerPoint using VBA

Is there a way to paste two images from the clipboard into Powerpoint using VBA? I have been able to paste one image, the most recently copied, using .Shape.Paste. However, I cannot figure out how to select the previous one as well.


Or alternatively, can every item in the clipboard be pasted at the same time?


Any help would be much appreciated.


how upload multiple images from PC folder to parse.com?

I'm looking a way to upload multiple images to my database in parse.com


does anyone know how to do this?


there are 200 photos which I want to put it in the database. But it kind a hard to upload it manually one by one.


rotate Frame in JavaCV

I write simple app for android whick use FFmpeg + JavaCV. I can capture image from camera and can recorde video. But want to rotate frame when record video, don't can :-( ![enter image description here][1]


http://ift.tt/1C8lg5P


stop and save code



public void stopRecording() {

runAudioThread = false;
try {
audioThread.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
audioRecordRunnable = null;
audioThread = null;


if (recorder != null && recording) {
if (RECORD_LENGTH > 0) {
Log.v(LOG_TAG,"Writing frames");
try {
int firstIndex = imagesIndex % samples.length;
int lastIndex = (imagesIndex - 1) % images.length;
if (imagesIndex <= images.length) {
firstIndex = 0;
lastIndex = imagesIndex - 1;
}
if ((startTime = timestamps[lastIndex] - RECORD_LENGTH * 1000000L) < 0) {
startTime = 0;
}
if (lastIndex < firstIndex) {
lastIndex += images.length;
}
for (int i = firstIndex; i <= lastIndex; i++) {
long t = timestamps[i % timestamps.length] - startTime;
if (t >= 0) {
if (t > recorder.getTimestamp()) {
recorder.setTimestamp(t);
}
recorder.record(images[i % images.length]);
}
}

firstIndex = samplesIndex % samples.length;
lastIndex = (samplesIndex - 1) % samples.length;
if (samplesIndex <= samples.length) {
firstIndex = 0;
lastIndex = samplesIndex - 1;
}
if (lastIndex < firstIndex) {
lastIndex += samples.length;
}
for (int i = firstIndex; i <= lastIndex; i++) {
recorder.recordSamples(samples[i % samples.length]);
}
} catch (FFmpegFrameRecorder.Exception e) {
Log.v(LOG_TAG,e.getMessage());
e.printStackTrace();
}
}

recording = false;
Log.v(LOG_TAG,"Finishing recording, calling stop and release on recorder");
try {
recorder.stop();
recorder.release();
} catch (FFmpegFrameRecorder.Exception e) {
e.printStackTrace();
}
recorder = null;

}
}


in step recorder.record(images[i % images.length]); need rotate frame (images parameter)


How can help me ? Thank you.