
Recherche avancée
Médias (1)
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (21)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.
Sur d’autres sites (2911)
-
matplotlib.animate saves only one still frame
22 août 2015, par dim_volyEDIT
Changed the presented code so that another person can take it away and reproduce the error. The data for the below code can be found here, including the code and the animation produced.
import os
import numpy as np
import matplotlib as mpl
mpl.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.animation as animation
if __name__ == '__main__':
print "Plotting Clevis LVDT Displacements"
os.chdir(r"F:\BrokenAnimation")
animation_data = np.loadtxt("animation_data.csv", delimiter=",")
time = animation_data[:,0]
L10 = animation_data[:,1]
L11 = animation_data[:,2]
L12 = animation_data[:,3]
def data_gen():
t = data_gen.t
cnt = 0
L10_iter = data_gen.L10_iter
L11_iter = data_gen.L11_iter
L12_iter = data_gen.L12_iter
while cnt < 35000:
cnt+=1
t += 10.0
yield [-10.25, L10_iter.next()], [10.1875, L11_iter.next()],
[L12_iter.next(), -9.0]
data_gen.t = 0
data_gen.L10_iter = iter(np.array(L10))
data_gen.L11_iter = iter(np.array(L11))
data_gen.L12_iter = iter(np.array(L12))
fig, ax = plt.subplots()
scat = ax.scatter([0.0, 0.0, 0.0], [0.0, 0.0, 0.0])
ax.set_xlim(-15, 15)
ax.set_ylim(-10.0, 0.5)
ax.set_ylim(-0.5, 0.5)
ax.grid()
def run(data):
# update the data
x, y, z = data
scat.set_offsets([x, y, z])
return scat,
ani = animation.FuncAnimation(fig, run, data_gen,
blit=True, interval=40, # 40msec? implying 25fps?
)
# This works
plt.show()
# Doesn't really save what I see in plt.show()
ani.save('South_Clevis.mp4') # 435kb file 4 sec long, 25 fps 800x600 887KbpsI’m trying to plot a time history of the displacements of the dots below :
The dots at y = 0.0 are the original positions and the animation moves the dots up and down. For context, the dots represent LVDT displacements over a time history of 35,000 sec with a sample rate of 1 per second. So each "second" the plot should be updated.
Bitrate does not appear to be a keyword that actually does anything. I have ffmpeg installed and it is on the Windows path. Using the basic writer example (but without the line
matplotlib.use("Agg")
, because python complained) works fine and produces an animation that can be played back. -
How to import the CascadeClassifier module from Opencv ?
22 juillet 2015, par kylel95This porgram is to detect faces in the specified image. I have opencv and ffmpeg properly installed. Also, when I check the file path to see if CascadeClassifer was there, indeed it was. I somehow, still received the error :
AttributeError : ’module’ object has no attribute ’CascadeClassifer’. I was thinking maybe it should not be called using ’cv2.CascadeClassifier’ and maybe something more lengthy. Thank youimport cv2
import numpy as np
face_cascade = cv2.CascadeClassifer('haarcascade_frontalface_default.xml')
eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml')
image = cv2.imread('image.png')
gray = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
faces = face_cascade.detectMultiScale(gray, 1.3, 5)
for (x,y,w,h) in faces:
cv2.rectangle(image,(x,y),(x+w,y+h), (225,0,0),2)
roi_gray = gray[y:y+h, x:x+w]
roi_color = image[y:y+h, x:x+w]
eyes = eye_cascade.detectMultiScale(roi_gray)
for (ex,ey,ew,eh) in eyes:
cv2.rectangle(roi_color,(ex,ey),(ex+ew,ey+eh),(0,255,0),2)
cv2.imshow('Imgae', image)
cv2.waitKey(0)
cv2.destroyAllWindows() -
FFMPEG - How to get a blur effect, without altering the color white ?
17 août 2016, par HugoI need a picture, with blur effect background. I found the code works, but, the white color of the photos is lost ( only happens with white color)...
Step1 : ffmpeg -i eyes.jpg -s 640x360 -qscale 1 bg.jpg Step2 : ffmpeg -i bg.jpg -filter_complex "[0:v]crop=640:360:0:0,boxblur=20[fg] ;[0:v][fg]overlay=0:0[v]" -map "[v]" -qscale 1 bg.jpg -y Step3 : ffmpeg -i bg.jpg -i eyes.jpg -filter_complex "overlay=(main_w-overlay_w)/2 :(main_h-overlay_h)/2" -qscale 1 result.jpg
Original photo :
see original photoResult (white color is lost)
see result photoPlease I need help (The white color should remain).
Thank you very much,
Greetings,
Hugo