Autor Beitrag
BennyM
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Mo 04.10.04 15:33 
Hallo,
ich habe an meinem rechner eine usb webcam angeschlossen. bisher ist es so, das es über die software der webcam angezeigt wird. wenn ich dann das bild gemacht habe, wird es in einem image in delphi angezeigt. jetzt möcht ich es aber so haben, das mir das bild der webcam direkt in delphi (mit hilfe einer componente o.ä.) angezeigt wird ohne das es über die software der webcam läuft! Kann mir da jemand weiter helfen?
Danke
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Di 05.10.04 06:59 
Da kann ich (leider) nur mit nem Suchtipp bei Google dienen: Suche bei Google VFW DELPHI
Kommst Du u.a. hier hin.

_________________
JSXGraph
BennyM Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Mi 06.10.04 11:56 
danke sehr das hat mir sehr weiter geholfen.

nun steh ich aber vor dem nächsten problem und zwar ich hab jetzt ein bild gemacht mit der auflösung 320x240. jetzt möchte ich aus diesem Bild ein kleines bild 160x120 ausschneiden das hab ich soweit auch hinbekommen das ich mir ein rechteck zeichne und dieses dann in ein image lade... jetzt möchte ich aber das mir das bild (320x240) in der größe von 640x480 angezeigt wird. ich dachte mir, das ich das mit strechdraw mache hat auch wunderbar geklappt aber jetzt kommt das problem und zwar kann ich mein kleines rechteck nur im dem bereich von 320x240 hin und herbewegen...
gibt es vielleicht ne möglichkeit das ich mein 320x240 bild in ein 640x480 umwandle also ohne strechdraw ???
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Mi 06.10.04 12:49 
" zwar kann ich mein kleines rechteck nur im dem bereich von 320x240 hin und herbewegen..."

verstreh dich zwar net ganz aber kannst das bild als bmp datei abspeichern und dann wieder in nem image öffnen und die eigenschaft stretch auf true stellen und dann isses genau so groß wie die image komponente (width u. height)

weiß nicht ob es auch geht wenn man vorher das bild auf den image canvas zeichnet und dann stretch auf true macht ;P
MrSaint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Mi 06.10.04 12:54 
Ich gehe davon aus, dass du dein Bild intern in irgendeiner Struktur hälst, die ein Canvas besitzt (also z.B. TBitmap, TJPEGImage)... Jetzt erstellst du dir nochmal ein TBitmap und nimmst da die Prozedur CopyRect von dessen Canvas:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
  bmpNew := TBitmap.Create;
  bmpNew.Height := 480;
  bmpNew.Width := 640;
  bmpNew.Canvas.CopyRect(Rect(0, 0, bmpNew.Width, bmpNew.Height), bmpSource.Canvas, Rect(0, 0, bmpSource.Width, bmpSource.Height));


bmpSource wäre in dem Fall das Bitmap, in dem du im Moment das Bild hälst (wenn du es in einem TBitmap hälst).


MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
BennyM Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Mi 06.10.04 14:41 
ja das ist richtig.

ich habe jetzt gerade eben noch eine andere lösung gefunden aber trotzdem herzlichen dank
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mi 06.10.04 14:44 
BennyM hat folgendes geschrieben:
ich habe jetzt gerade eben noch eine andere lösung gefunden (...)

Lässt Du uns auch daran teilhaben?

_________________
JSXGraph
BennyM Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Do 07.10.04 11:02 
ich hab es nun doch mit stretchdraw gemacht.
ich hab so hin bekommen, das es er mir mein livebild in egal welcher auflösung ich aufnehme in der größe von 200x250 (also auf nem kleinen panel einfach) anzeigt aber in der ausgewählten auflösung aufnimmt und dann im image auf 640x480 anzeigt...
Kalti
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Sa 15.01.05 17:04 
Hallo,

ich hole mal diesen alten Beitrag nach oben, da ich so ein ähnliches Problem habe.

Ich habe ne Kamera die mir ein Signal von wahlweise (320x240 oder 640x480) als LiveStream liefert. Das läuft auch prima. Jetzt will ich dieses Signal aber mit einer freine Auflösung wiedergeben (z.B. 300x225)

Wie kann ich das mit dem Panel (oder anders?) realisieren.

Danke für eure Antworten.